Skip to content

Commit d3880ec

Browse files
committed
move brain model call up
1 parent b8426af commit d3880ec

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

apis/cloudflare/src/billing.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ function isBrainModel(model: string): boolean {
88
}
99

1010
function buildPayloadEvent(event: BillingEvent) {
11-
if (!event.org_id) {
12-
console.warn("billing event skipped: missing org_id");
13-
return null;
14-
}
1511
if (!event.model) {
1612
console.warn("billing event skipped: missing model");
1713
return null;
@@ -20,6 +16,11 @@ function buildPayloadEvent(event: BillingEvent) {
2016
if (!isBrainModel(event.model)) {
2117
return null;
2218
}
19+
20+
if (!event.org_id) {
21+
console.warn("billing event skipped: missing org_id");
22+
return null;
23+
}
2324
if (!event.resolved_model) {
2425
console.warn("billing event skipped: missing resolved_model");
2526
return null;

0 commit comments

Comments
 (0)