Skip to content

Commit 144c296

Browse files
committed
turn into drizzle transactions
1 parent 6e3b106 commit 144c296

File tree

3 files changed

+187
-184
lines changed

3 files changed

+187
-184
lines changed

apps/web/src/app/api/ai/journl-agent/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async function handler(req: Request) {
2727
} satisfies JournlAgentContext),
2828
});
2929

30-
// Track usage after streaming completes
30+
// Track usage after streaming completes.
3131
if (session.user?.id) {
3232
const fullOutput = await result.getFullOutput();
3333
const usage = fullOutput.usage;

apps/web/src/app/api/supabase/usage/route.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ import { handler } from "../_lib/webhook-handler";
55

66
/**
77
* This webhook processes usage events when they are created or updated.
8-
*
98
* Usage events are created when AI features are used (chat, embedding, etc.)
10-
* and this webhook processes them to update usage aggregates and billing.
119
*/
1210
export const POST = handler(zUsageEventWebhook, async (payload) => {
13-
// Skip DELETE events for now
11+
// Skip DELETE events
1412
if (payload.type === "DELETE") {
1513
return NextResponse.json({ success: true });
1614
}

0 commit comments

Comments
 (0)