remove old bs code, start getting ready for freebsd and openbsd support

This commit is contained in:
KingKDot
2026-03-09 00:46:29 -05:00
parent 768b93f02a
commit 38a330f305
8 changed files with 93 additions and 198 deletions
-26
View File
@@ -122,32 +122,6 @@ export async function sendCommand(clientId, action) {
}
}
export async function sendSupportChat(clientId, message, requireReply = true) {
try {
const res = await fetch(`/api/clients/${clientId}/command`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ action: "support_chat", message, requireReply }),
});
const data = await res.json().catch(() => ({}));
if (!res.ok) {
return {
ok: false,
error: data?.error || `support chat failed ${res.status}`,
response: "",
};
}
return {
ok: Boolean(data?.ok),
error: data?.error || "",
response: typeof data?.response === "string" ? data.response : "",
};
} catch (err) {
console.error(err);
return { ok: false, error: "Support chat request failed", response: "" };
}
}
export async function fetchVoiceCapabilities(clientId) {
try {
const res = await fetch(`/api/clients/${clientId}/command`, {