File tree Expand file tree Collapse file tree 3 files changed +187
-184
lines changed
packages/api/src/api-router Expand file tree Collapse file tree 3 files changed +187
-184
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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 */
1210export 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 }
You can’t perform that action at this time.
0 commit comments