Read vapid details from runtime config
Use the useRuntimeConfig interface to read vapid details on the server side. This is a more portale way to deal with loading data from the environment in Nuxt.js.
This commit is contained in:
parent
742be649eb
commit
c986d939ec
3 changed files with 27 additions and 8 deletions
|
@ -27,5 +27,5 @@ export default defineEventHandler(async (event) => {
|
|||
});
|
||||
await broadcastUpdate(schedule);
|
||||
await writeSchedule(schedule);
|
||||
await sendPush("New event", `${name} will start at ${start}`);
|
||||
await sendPush(event, "New event", `${name} will start at ${start}`);
|
||||
});
|
||||
|
|
|
@ -33,5 +33,5 @@ export default defineEventHandler(async (event) => {
|
|||
await broadcastUpdate(schedule);
|
||||
await writeSchedule(schedule);
|
||||
if (timeChanged)
|
||||
await sendPush(`New time for ${name}`, `${name} will now start at ${start}`);
|
||||
await sendPush(event, `New time for ${name}`, `${name} will now start at ${start}`);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue