blob: 7bbf8f3f31ed442921204b834d3af8952d2cc4ba (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
import { error, json } from '@sveltejs/kit';
import { type Session } from '../../../../../hooks.server.js';
export const GET = async ({ locals }) => {
const data = (await locals.auth()) as Session;
if (data === undefined) throw error(403, 'Unauthorized');
if (data === null) throw error(401, 'Session Expired');
return json({
todo: 'implement',
});
};
|