aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/api/v1/vms
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-09-21 01:13:25 +0000
committerLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-09-21 01:13:25 +0000
commit9d26295c65d2c68ae5012bea1b20ea7e45e93325 (patch)
tree3616eccafc248e25eb7f0e8c93e15b2863e8a502 /src/routes/api/v1/vms
parent11877824040ed2b92dab0efe04d7b24c64fa39cd (diff)
downloadcrunched-9d26295c65d2c68ae5012bea1b20ea7e45e93325.tar.gz
crunched-9d26295c65d2c68ae5012bea1b20ea7e45e93325.tar.bz2
crunched-9d26295c65d2c68ae5012bea1b20ea7e45e93325.tar.lz
crunched-9d26295c65d2c68ae5012bea1b20ea7e45e93325.zip

feat: misc changes before hopefully actually starting

HEADmaster
Diffstat (limited to 'src/routes/api/v1/vms')
-rw-r--r--src/routes/api/v1/vms/list/+server.ts12
1 files changed, 12 insertions, 0 deletions
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',
+ });
+};