Files
car-crushers-portal/functions/api/appeals/_middleware.ts
2023-10-19 16:49:18 -04:00

12 lines
279 B
TypeScript

export async function onRequest(context: RequestContext) {
if (!context.data.current_user)
return new Response('{"error":"Not logged in"}', {
headers: {
"content-type": "application/json",
},
status: 401,
});
return await context.next();
}