Make bot types an extension of the bot's kind
Coordinator and worker come from bots.kind; bot_types now only holds workspace_admin (was admin), each row naming its workspace, with no scope field. Rows from v0.2.8 and earlier are fixed at boot by migrateBotTypes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -54,7 +54,7 @@ export default function BotAdminMenuItem({
|
||||
|
||||
const res = await postAdminApi({
|
||||
path: "bots/set-bot-type",
|
||||
body: { bot_id, workspace_id, bot_type: "admin", given },
|
||||
body: { bot_id, workspace_id, bot_type: "workspace_admin", given },
|
||||
}).catch(() => null);
|
||||
|
||||
setLoading(false);
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ export default function WorkspaceBotsGroup({ workspace_id, workspace_name, bots:
|
||||
|
||||
const res = await postAdminApi<WorkspaceBot>({
|
||||
path: "bots/set-bot-type",
|
||||
body: { workspace_id, bot_id: bot.id, bot_type: "admin", given },
|
||||
body: { workspace_id, bot_id: bot.id, bot_type: "workspace_admin", given },
|
||||
});
|
||||
|
||||
setAdminBusyId(undefined);
|
||||
|
||||
Reference in New Issue
Block a user