f55b3add80
Co-authored-by: Thomas Way <thomas@6f.io>
17 lines
358 B
TypeScript
17 lines
358 B
TypeScript
import { AppRoute } from '$lib/constants';
|
|
import { redirect } from '@sveltejs/kit';
|
|
import type { PageServerLoad } from './$types';
|
|
|
|
export const load = (async ({ locals: { user } }) => {
|
|
if (!user) {
|
|
throw redirect(302, AppRoute.AUTH_LOGIN);
|
|
}
|
|
|
|
return {
|
|
user,
|
|
meta: {
|
|
title: 'Shared Links',
|
|
},
|
|
};
|
|
}) satisfies PageServerLoad;
|