mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-01-16 22:25:58 +00:00
feat(server): improve API specification (#1853)
This commit is contained in:
@@ -12,7 +12,7 @@ export const load: PageServerLoad = async ({ params, parent }) => {
|
||||
const { key } = params;
|
||||
|
||||
try {
|
||||
const { data: sharedLink } = await api.shareApi.getMySharedLink({ params: { key } });
|
||||
const { data: sharedLink } = await api.shareApi.getMySharedLink(key);
|
||||
|
||||
const assetCount = sharedLink.assets.length;
|
||||
const assetId = sharedLink.album?.albumThumbnailAssetId || sharedLink.assets[0]?.id;
|
||||
|
||||
@@ -7,9 +7,7 @@ import type { PageServerLoad } from './$types';
|
||||
export const load: PageServerLoad = async ({ params }) => {
|
||||
try {
|
||||
const { key, assetId } = params;
|
||||
const { data: asset } = await api.assetApi.getAssetById(assetId, {
|
||||
params: { key }
|
||||
});
|
||||
const { data: asset } = await api.assetApi.getAssetById(assetId, key);
|
||||
|
||||
if (!asset) {
|
||||
return error(404, 'Asset not found');
|
||||
|
||||
Reference in New Issue
Block a user