mirror of
https://github.com/immich-app/immich.git
synced 2025-12-10 03:23:45 +09:00
refactor: remove smart search entity (#17447)
refactor: smart search entity
This commit is contained in:
@@ -13,7 +13,10 @@ import { PartnerRepository } from 'src/repositories/partner.repository';
|
||||
import { IBulkAsset, ImmichFile, UploadFile } from 'src/types';
|
||||
import { checkAccess } from 'src/utils/access';
|
||||
|
||||
export const getAssetFile = (files: AssetFileEntity[], type: AssetFileType | GeneratedImageType) => {
|
||||
export const getAssetFile = <T extends { type: AssetFileType }>(
|
||||
files: T[],
|
||||
type: AssetFileType | GeneratedImageType,
|
||||
) => {
|
||||
return (files || []).find((file) => file.type === type);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user