fix: auto-enable leader summary routing
This commit is contained in:
@@ -157,16 +157,6 @@ const channelUpdateSchema = z.object({
|
||||
enabled: z.boolean().optional()
|
||||
});
|
||||
const channelRotateKeySchema = z.object({ agentbus_key: z.string().min(1).max(4_000) });
|
||||
const leaderSummarySubscriptionSchema = z.object({
|
||||
channel_id: z.string().uuid(),
|
||||
recipient_address: z.string().trim().min(1).max(500).optional(),
|
||||
conversation_id: z.string().trim().min(1).max(500).optional(),
|
||||
include_manual: z.boolean(),
|
||||
include_agentbus: z.boolean(),
|
||||
enabled: z.boolean(),
|
||||
target_verified: z.boolean().optional(),
|
||||
expected_revision: z.number().int().min(0).optional()
|
||||
});
|
||||
const listTasksQuerySchema = z.object({
|
||||
status: z.string().max(80).optional(),
|
||||
search: z.string().max(200).optional(),
|
||||
@@ -1191,27 +1181,6 @@ export async function buildServer({
|
||||
};
|
||||
});
|
||||
|
||||
app.put('/api/settings/leader-summary-subscriptions/:leaderUserId', async (request) => {
|
||||
const session = await requireAdminMutationSession(request);
|
||||
const params = request.params as { leaderUserId: string };
|
||||
const body = leaderSummarySubscriptionSchema.parse(request.body);
|
||||
const subscription = await leaderNotificationService.upsertSubscription(
|
||||
contextFor(session, request),
|
||||
{
|
||||
leaderUserId: params.leaderUserId,
|
||||
channelId: body.channel_id,
|
||||
recipientAddress: body.recipient_address,
|
||||
conversationId: body.conversation_id,
|
||||
includeManual: body.include_manual,
|
||||
includeAgentBus: body.include_agentbus,
|
||||
enabled: body.enabled,
|
||||
targetVerified: body.target_verified,
|
||||
expectedRevision: body.expected_revision
|
||||
}
|
||||
);
|
||||
return { ok: true, subscription };
|
||||
});
|
||||
|
||||
app.post('/api/auth/logout', async (request, reply) => {
|
||||
setAuthNoStore(reply);
|
||||
const session = await requireAuthenticatedMutationSession(request);
|
||||
|
||||
Reference in New Issue
Block a user