Change POST to GET for view counter
This commit is contained in:
parent
4f6d82bc7b
commit
8b7301d0da
2 changed files with 2 additions and 13 deletions
|
|
@ -46,18 +46,7 @@ function jsonResponse(data: object, status = 200): Response {
|
|||
});
|
||||
}
|
||||
|
||||
export const POST: APIRoute = async ({ request, url }) => {
|
||||
if (request.method === 'OPTIONS') {
|
||||
return new Response(null, {
|
||||
status: 204,
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Methods': 'POST, OPTIONS',
|
||||
'Access-Control-Allow-Headers': 'Content-Type',
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export const GET: APIRoute = async ({ request, url }) => {
|
||||
console.log('[Increment Views] PB_URL:', POCKETBASE_URL);
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue