Commit 690d9712 authored by wycers's avatar wycers
Browse files

correct routing

parent a46d613f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ import _ from 'lodash';

export const load: ServerLoad = async ({ params, locals, parent }) => {
	const { user } = locals;
	if (!user) {
	if (_.isNil(user)) {
		console.log('no user');
		redirect(302, '/login');
	}
+1 −3
Original line number Diff line number Diff line
import type { PageServerLoad } from './$types';

export const load: PageServerLoad = async ({ locals }) => {
	return {
		username: locals.user.id
	};
	return {};
};