Files
immich/web/src/routes/(user)/sharing/+page.ts
T
2024-06-13 09:23:52 -05:00

21 lines
545 B
TypeScript

import { authenticate } from '$lib/utils/auth';
import { getAllAlbums, getPartners } from '@immich/sdk';
import { t } from 'svelte-i18n';
import { get } from 'svelte/store';
import type { PageLoad } from './$types';
export const load = (async () => {
await authenticate();
const sharedAlbums = await getAllAlbums({ shared: true });
const partners = await getPartners({ direction: 'shared-with' });
const $t = get(t);
return {
sharedAlbums,
partners,
meta: {
title: $t('sharing'),
},
};
}) satisfies PageLoad;