Skip to content

Commit

Permalink
Merge pull request #64 from manuelsanchezweb/feature/add-proto-pwa
Browse files Browse the repository at this point in the history
Feature/add proto pwa
  • Loading branch information
manuelsanchez2 authored Jul 10, 2024
2 parents 485c87a + dd2c284 commit 9216aec
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/routes/cron/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { RequestHandler } from '@builder.io/qwik-city'

export const onRequest: RequestHandler = ({
headers,
query,
json,
request,
}) => {
console.log('This is the request:', request)
headers.set('Cache-Control', 'private')
if (query.get('format') === 'json') {
json(200, { message: 'Hello World' })
}
}
2 changes: 1 addition & 1 deletion src/routes/notifications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const onPost = async ({
title: body.title,
message: body.message,
url: 'https://qwik-calendar.vercel.app/',
icon: 'https://qwik-calendar.vercel.app/home.png',
icon: 'https://qwik-calendar.vercel.app/logo.png',
})

const response = await fetch('https://api.pushalert.co/rest/v1/send', {
Expand Down
6 changes: 6 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@
}
]
}
],
"crons": [
{
"path": "/cron",
"schedule": "0 0 * * *"
}
]
}

0 comments on commit 9216aec

Please sign in to comment.