Spaces:
Sleeping
Sleeping
Commit
·
03b6c08
1
Parent(s):
a759fbd
chore(lint): prefer-const for billTo in ask-ai route
Browse files- app/api/ask-ai/route.ts +2 -2
app/api/ask-ai/route.ts
CHANGED
|
@@ -71,7 +71,7 @@ export async function POST(request: NextRequest) {
|
|
| 71 |
// Optional: allow billing to a specific org if the token has permissions.
|
| 72 |
// If not set, we bill to the token owner (recommended for demo tokens).
|
| 73 |
const BILL_TO_ORG = process.env.BILL_TO_ORG;
|
| 74 |
-
|
| 75 |
|
| 76 |
/**
|
| 77 |
* Handle local usage token, this bypass the need for a user token
|
|
@@ -254,7 +254,7 @@ export async function PUT(request: NextRequest) {
|
|
| 254 |
|
| 255 |
let token = userToken;
|
| 256 |
const BILL_TO_ORG = process.env.BILL_TO_ORG;
|
| 257 |
-
|
| 258 |
|
| 259 |
/**
|
| 260 |
* Handle local usage token, this bypass the need for a user token
|
|
|
|
| 71 |
// Optional: allow billing to a specific org if the token has permissions.
|
| 72 |
// If not set, we bill to the token owner (recommended for demo tokens).
|
| 73 |
const BILL_TO_ORG = process.env.BILL_TO_ORG;
|
| 74 |
+
const billTo: string | null = BILL_TO_ORG ?? null;
|
| 75 |
|
| 76 |
/**
|
| 77 |
* Handle local usage token, this bypass the need for a user token
|
|
|
|
| 254 |
|
| 255 |
let token = userToken;
|
| 256 |
const BILL_TO_ORG = process.env.BILL_TO_ORG;
|
| 257 |
+
const billTo: string | null = BILL_TO_ORG ?? null;
|
| 258 |
|
| 259 |
/**
|
| 260 |
* Handle local usage token, this bypass the need for a user token
|