mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-08 12:19:05 +00:00
chore(web): generate API functions with a single argument (#2568)
This commit is contained in:
@@ -7,7 +7,7 @@ export const load = (async ({ params, locals: { api } }) => {
|
||||
const { key } = params;
|
||||
|
||||
try {
|
||||
const { data: sharedLink } = await api.shareApi.getMySharedLink(key);
|
||||
const { data: sharedLink } = await api.shareApi.getMySharedLink({ key });
|
||||
|
||||
const assetCount = sharedLink.assets.length;
|
||||
const assetId = sharedLink.album?.albumThumbnailAssetId || sharedLink.assets[0]?.id;
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { PageServerLoad } from './$types';
|
||||
export const load = (async ({ params, locals: { api } }) => {
|
||||
try {
|
||||
const { key, assetId } = params;
|
||||
const { data: asset } = await api.assetApi.getAssetById(assetId, 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