Skip to content

Commit b10cf82

Browse files
committed
fix: env var
1 parent c68478e commit b10cf82

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/playwright.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ jobs:
2121
- name: Build Next.js app
2222
run: npm run build
2323
- name: Start Next.js app
24-
run: npm run start &
24+
env:
25+
NEXT_PUBLIC_NOVU_CLIENT_APP_ID: ${{ secrets.NEXT_PUBLIC_NOVU_CLIENT_APP_ID }}
26+
NOVU_SECRET_KEY: ${{ secrets.NOVU_SECRET_KEY }}
27+
run: |
28+
echo "NEXT_PUBLIC_NOVU_CLIENT_APP_ID=$NEXT_PUBLIC_NOVU_CLIENT_APP_ID" >> .env
29+
echo "NOVU_SECRET_KEY=$NOVU_SECRET_KEY" >> .env
30+
npm run start &
2531
- name: Wait for Next.js to start
2632
run: |
2733
timeout=30

src/app/api/trigger/route.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ export async function POST(request: Request) {
88
const { workflowId, to, payload, controls, bridgeUrl } = body;
99

1010
if (!to.subscriberId) {
11-
return Response.json(
12-
{ error: "Subscriber id is required" },
13-
{ status: 400 }
14-
);
11+
return Response.json({ error: "Subscriber id is required" }, { status: 400 });
1512
}
1613

1714
try {
@@ -31,7 +28,7 @@ export async function POST(request: Request) {
3128
Authorization: `ApiKey ${NOVU_API_KEY}`,
3229
"Content-Type": "application/json",
3330
},
34-
}
31+
},
3532
);
3633

3734
return Response.json(response.data, { status: 200 });

0 commit comments

Comments
 (0)