1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-15 03:30:33 +02:00

refactor(web): use ImmichApi to create urls (#2435)

This commit is contained in:
Michel Heusschen
2023-05-14 04:52:29 +02:00
committed by GitHub
parent 15fa8250cb
commit 4524aa0d06
13 changed files with 53 additions and 51 deletions

View File

@ -1,18 +1,10 @@
import { api, AddAssetsResponseDto, AssetResponseDto, ThumbnailFormat } from '@api';
import { api, AddAssetsResponseDto, AssetResponseDto } from '@api';
import {
notificationController,
NotificationType
} from '$lib/components/shared-components/notification/notification';
import { downloadAssets } from '$lib/stores/download';
export const getThumbnailUrl = (assetId: string, format: ThumbnailFormat, key?: string) => {
let url = `/api/asset/thumbnail/${assetId}?format=${format}`;
if (key) {
url += `&key=${key}`;
}
return url;
};
export const addAssetsToAlbum = async (
albumId: string,
assetIds: Array<string>,