From 9d26295c65d2c68ae5012bea1b20ea7e45e93325 Mon Sep 17 00:00:00 2001 From: memdmp Date: Sun, 21 Sep 2025 01:13:25 +0000 Subject: feat: misc changes before hopefully actually starting --- src/routes/api/v1/vms/list/+server.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/routes/api/v1/vms/list/+server.ts (limited to 'src/routes/api/v1/vms/list') diff --git a/src/routes/api/v1/vms/list/+server.ts b/src/routes/api/v1/vms/list/+server.ts new file mode 100644 index 0000000..7bbf8f3 --- /dev/null +++ b/src/routes/api/v1/vms/list/+server.ts @@ -0,0 +1,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', + }); +}; -- cgit v1.2.3