mirror of
https://github.com/immich-app/immich.git
synced 2025-12-07 05:35:34 -05:00
18 lines
470 B
TypeScript
18 lines
470 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: sharedAlbums } = await api.albumApi.getAllAlbums({ shared: true });
|
|
const { data: partners } = await api.partnerApi.getPartners({ direction: 'shared-with' });
|
|
|
|
return {
|
|
sharedAlbums,
|
|
partners,
|
|
meta: {
|
|
title: 'Sharing',
|
|
},
|
|
};
|
|
}) satisfies PageLoad;
|