1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-05 05:05:17 +02:00

Merge pull request #114 from seanmorley15/development

fixes
This commit is contained in:
Sean Morley 2024-07-10 18:33:25 -04:00 committed by GitHub
commit b05764eff8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,8 +1,9 @@
import { redirect } from '@sveltejs/kit'; import { redirect } from '@sveltejs/kit';
import type { PageServerLoad, RequestEvent } from '../$types'; import type { PageServerLoad, RequestEvent } from '../$types';
import { PUBLIC_SERVER_URL } from '$env/static/public'; import { PUBLIC_SERVER_URL } from '$env/static/public';
const endpoint = PUBLIC_SERVER_URL || 'http://localhost:8000';
export const load: PageServerLoad = async (event: RequestEvent) => { export const load: PageServerLoad = async (event: RequestEvent) => {
const endpoint = PUBLIC_SERVER_URL || 'http://localhost:8000';
if (!event.locals.user || !event.cookies.get('auth')) { if (!event.locals.user || !event.cookies.get('auth')) {
return redirect(302, '/login'); return redirect(302, '/login');
} }