c602eaea4a
* use svelte store * fix: websocket error when not authenticated * more routes
16 lines
334 B
TypeScript
16 lines
334 B
TypeScript
import { authenticate } from '$lib/utils/auth';
|
|
import { api } from '@api';
|
|
import type { PageLoad } from './$types';
|
|
|
|
export const load = (async () => {
|
|
await authenticate();
|
|
const { data: albums } = await api.albumApi.getAllAlbums();
|
|
|
|
return {
|
|
albums,
|
|
meta: {
|
|
title: 'Albums',
|
|
},
|
|
};
|
|
}) satisfies PageLoad;
|