mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 17:24:56 +03:00
refactor: remove album entity, update types (#17450)
This commit is contained in:
@@ -13,11 +13,8 @@ import { PartnerRepository } from 'src/repositories/partner.repository';
|
||||
import { IBulkAsset, ImmichFile, UploadFile } from 'src/types';
|
||||
import { checkAccess } from 'src/utils/access';
|
||||
|
||||
export const getAssetFile = <T extends { type: AssetFileType }>(
|
||||
files: T[],
|
||||
type: AssetFileType | GeneratedImageType,
|
||||
) => {
|
||||
return (files || []).find((file) => file.type === type);
|
||||
export const getAssetFile = (files: AssetFile[], type: AssetFileType | GeneratedImageType) => {
|
||||
return files.find((file) => file.type === type);
|
||||
};
|
||||
|
||||
export const getAssetFiles = (files: AssetFile[]) => ({
|
||||
|
||||
Reference in New Issue
Block a user