diff options
| author | Fuwn <[email protected]> | 2026-03-27 09:30:36 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-27 09:30:36 +0000 |
| commit | 7653144fe7b185260c5a1b647cf1b83e78069177 (patch) | |
| tree | bdc4c33ebbd5bce99c87f9c74e50f602662d9772 /src/trigger | |
| parent | chore(pnpm): Update lockfile (diff) | |
| download | due.moe-7653144fe7b185260c5a1b647cf1b83e78069177.tar.xz due.moe-7653144fe7b185260c5a1b647cf1b83e78069177.zip | |
refactor(supabase): move app access to service role
Diffstat (limited to 'src/trigger')
| -rw-r--r-- | src/trigger/notifications.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/trigger/notifications.ts b/src/trigger/notifications.ts index ae3c206c..8a16624c 100644 --- a/src/trigger/notifications.ts +++ b/src/trigger/notifications.ts @@ -1,6 +1,6 @@ +import { createClient } from "@supabase/supabase-js"; import { envvars, schedules } from "@trigger.dev/sdk"; import * as webpush from "web-push"; -import { createClient } from "@supabase/supabase-js"; export const notificationsTask = schedules.task({ id: "notifications", @@ -20,7 +20,7 @@ export const notificationsTask = schedules.task({ await envvars.retrieve( triggerProjectReference, environment, - "SUPABASE_ANON_KEY", + "SUPABASE_SERVICE_ROLE_KEY", ) ).value, ) @@ -58,7 +58,7 @@ export const notificationsTask = schedules.task({ for (const subscription of await getUserSubscriptions()) try { - await webpush.sendNotification(subscription["subscription"], "."); + await webpush.sendNotification(subscription.subscription, "."); } catch (error) { console.error(error); } |