mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor: remove smart search entity (#17447)
refactor: smart search entity
This commit is contained in:
parent
2b131fe935
commit
fdbe6d649f
10 changed files with 125 additions and 134 deletions
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue