This commit is contained in:
Dorian
2026-03-12 16:35:59 +00:00
parent 45216e5dfc
commit bc4a52bc12
18 changed files with 1754 additions and 85 deletions
+2 -2
View File
@@ -293,7 +293,7 @@ export function useNostr() {
}
}
async function registerBot(name: string, webhookUrl: string, archetype: string): Promise<BotData> {
async function registerBot(name: string, webhookUrl: string, archetype: string): Promise<{ bot: BotData; secret: string; mode: string }> {
if (!pubkey.value) throw new Error('Not logged in')
const res = await authFetch('/api/auth/register', {
@@ -341,7 +341,7 @@ export function useNostr() {
// Non-critical: existing JWT still works, just missing botId
}
return bot.value
return { bot: bot.value, secret: data.secret, mode: data.mode || 'webhook' }
}
async function updateCustomization(customization: BotCustomization): Promise<void> {