11 lines
262 B
TypeScript
11 lines
262 B
TypeScript
import type { APIRoute } from 'astro';
|
|
|
|
export const prerender = false;
|
|
|
|
export const GET: APIRoute = ({ locals }) => {
|
|
return new Response(JSON.stringify({ user: locals.user }), {
|
|
status: 200,
|
|
headers: { 'Content-Type': 'application/json' },
|
|
});
|
|
};
|