Merge pull request 'Node page Discord picker: org's servers + voice channels, not raw IDs (#213 item 3)' (#220) from feat/213-node-join-picker into main
Build & Deploy / Build & push images (push) Successful in 4m58s
Build & Deploy / Deploy Firestore rules & indexes (push) Successful in 29s
Build & Deploy / Deploy to VM (push) Successful in 2m37s
Build & Deploy / Report a failed deploy (push) Skipped

Reviewed-on: #220
This commit was merged in pull request #220.
This commit is contained in:
2026-10-04 22:05:49 -04:00
11 changed files with 1230 additions and 104 deletions
+15
View File
@@ -101,6 +101,21 @@ export const c2api = {
),
rejectNode: (id: string) =>
request(`/nodes/${id}/reject`, { method: "POST" }),
// Node-page Discord picker (server-26#213 item 3) — org-scoped server side.
getNodeDiscordOptions: (nodeId: string) =>
request<import("@/lib/discordPicker").DiscordJoinOptions>(`/discord/nodes/${nodeId}/join-options`),
startNodeDiscordStream: (nodeId: string, body: { guild_id: string; channel_id: string; mode: "adhoc" | "persistent" }) =>
request<import("@/lib/discordPicker").DiscordStartResult>(`/discord/nodes/${nodeId}/streams`, {
method: "POST",
body: JSON.stringify(body),
}),
/** Omit streamId to stop every radio channel this node carries. */
stopNodeDiscordStreams: (nodeId: string, streamId?: string) =>
request<{ ok: boolean; stopped: string[] }>(`/discord/nodes/${nodeId}/streams/stop`, {
method: "POST",
body: JSON.stringify(streamId ? { stream_id: streamId } : {}),
}),
deleteNode: (id: string) =>
request(`/nodes/${id}`, { method: "DELETE" }),