File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export const serverEnvSchema = clientEnvSchema.extend({
77 OPENAI_API_KEY : z . string ( ) . min ( 1 ) ,
88 LINKUP_API_KEY : z . string ( ) . min ( 1 ) ,
99 CONTEXT7_API_KEY : z . string ( ) . optional ( ) ,
10- GRAVITY_API_KEY : z . string ( ) . optional ( ) ,
10+ GRAVITY_API_KEY : z . string ( ) . min ( 1 ) ,
1111 PORT : z . coerce . number ( ) . min ( 1000 ) ,
1212
1313 // Web/Database variables
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ const bodySchema = z.object({
2424} )
2525
2626export type GravityEnv = {
27- GRAVITY_API_KEY : string | undefined
27+ GRAVITY_API_KEY : string
28+ CB_ENVIRONMENT : string
2829}
2930
3031export async function postAds ( params : {
@@ -94,6 +95,7 @@ export async function postAds(params: {
9495 body : JSON . stringify ( {
9596 messages,
9697 user : { uid : userId } ,
98+ testAd : serverEnv . CB_ENVIRONMENT !== 'prod' ,
9799 } ) ,
98100 } )
99101
Original file line number Diff line number Diff line change @@ -16,6 +16,6 @@ export async function POST(req: NextRequest) {
1616 loggerWithContext,
1717 trackEvent,
1818 fetch,
19- serverEnv : { GRAVITY_API_KEY : env . GRAVITY_API_KEY } ,
19+ serverEnv : { GRAVITY_API_KEY : env . GRAVITY_API_KEY , CB_ENVIRONMENT : env . NEXT_PUBLIC_CB_ENVIRONMENT } ,
2020 } )
2121}
You can’t perform that action at this time.
0 commit comments