Skip to content

Commit

Permalink
fix: env var
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Oct 21, 2024
1 parent c68478e commit b10cf82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ jobs:
- name: Build Next.js app
run: npm run build
- name: Start Next.js app
run: npm run start &
env:
NEXT_PUBLIC_NOVU_CLIENT_APP_ID: ${{ secrets.NEXT_PUBLIC_NOVU_CLIENT_APP_ID }}
NOVU_SECRET_KEY: ${{ secrets.NOVU_SECRET_KEY }}
run: |
echo "NEXT_PUBLIC_NOVU_CLIENT_APP_ID=$NEXT_PUBLIC_NOVU_CLIENT_APP_ID" >> .env
echo "NOVU_SECRET_KEY=$NOVU_SECRET_KEY" >> .env
npm run start &
- name: Wait for Next.js to start
run: |
timeout=30
Expand Down
7 changes: 2 additions & 5 deletions src/app/api/trigger/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ export async function POST(request: Request) {
const { workflowId, to, payload, controls, bridgeUrl } = body;

if (!to.subscriberId) {
return Response.json(
{ error: "Subscriber id is required" },
{ status: 400 }
);
return Response.json({ error: "Subscriber id is required" }, { status: 400 });
}

try {
Expand All @@ -31,7 +28,7 @@ export async function POST(request: Request) {
Authorization: `ApiKey ${NOVU_API_KEY}`,
"Content-Type": "application/json",
},
}
},
);

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

0 comments on commit b10cf82

Please sign in to comment.