chore: flatten repo
All checks were successful
build / build (push) Successful in 47s
build / deploy (push) Successful in 17s

This commit is contained in:
2026-08-26 03:57:15 +00:00
parent b02a07d3bd
commit cb5fc9d095
85 changed files with 22 additions and 23 deletions

31
src/routes/+page.server.ts Executable file
View File

@@ -0,0 +1,31 @@
import { env } from '$env/dynamic/private';
export const actions = {
authenticate: async ({ request, cookies }) => {
const data = await request.formData();
const token = data.get('token');
if (!token) {
return {
status: 400,
body: { error: 'Missing token' }
};
}
if (token !== env.AUTH_TOKEN) {
return {
status: 401,
body: { error: 'Invalid token' }
};
}
cookies.set('token', token, {
path: '/',
maxAge: 60 * 60 * 24 * 7
});
return {
success: true
};
}
};