Jason Rasmussen 334a709cc6
refactor(server): partner search dto (#10902)
* refactor(server): partner search dto

* fix: missed reference

* mobile fix

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
2024-07-08 16:41:39 -04:00

20 lines
570 B
TypeScript

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