mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 09:15:05 +03:00
chore(server): remove unusuned endpoint/service/interface in asset-v1 (#9086)
This commit is contained in:
@@ -13,8 +13,6 @@ import {
|
||||
AssetRejectReason,
|
||||
AssetUploadAction,
|
||||
CheckExistingAssetsResponseDto,
|
||||
CuratedLocationsResponseDto,
|
||||
CuratedObjectsResponseDto,
|
||||
} from 'src/dtos/asset-v1-response.dto';
|
||||
import {
|
||||
AssetBulkUploadCheckDto,
|
||||
@@ -156,48 +154,6 @@ export class AssetServiceV1 {
|
||||
});
|
||||
}
|
||||
|
||||
async getAssetSearchTerm(auth: AuthDto): Promise<string[]> {
|
||||
const possibleSearchTerm = new Set<string>();
|
||||
|
||||
const rows = await this.assetRepositoryV1.getSearchPropertiesByUserId(auth.user.id);
|
||||
|
||||
for (const row of rows) {
|
||||
// tags
|
||||
row.tags?.map((tag: string) => possibleSearchTerm.add(tag?.toLowerCase()));
|
||||
|
||||
// objects
|
||||
row.objects?.map((object: string) => possibleSearchTerm.add(object?.toLowerCase()));
|
||||
|
||||
// asset's tyoe
|
||||
possibleSearchTerm.add(row.assetType?.toLowerCase() || '');
|
||||
|
||||
// image orientation
|
||||
possibleSearchTerm.add(row.orientation?.toLowerCase() || '');
|
||||
|
||||
// Lens model
|
||||
possibleSearchTerm.add(row.lensModel?.toLowerCase() || '');
|
||||
|
||||
// Make and model
|
||||
possibleSearchTerm.add(row.make?.toLowerCase() || '');
|
||||
possibleSearchTerm.add(row.model?.toLowerCase() || '');
|
||||
|
||||
// Location
|
||||
possibleSearchTerm.add(row.city?.toLowerCase() || '');
|
||||
possibleSearchTerm.add(row.state?.toLowerCase() || '');
|
||||
possibleSearchTerm.add(row.country?.toLowerCase() || '');
|
||||
}
|
||||
|
||||
return [...possibleSearchTerm].filter((x) => x != null && x != '');
|
||||
}
|
||||
|
||||
async getCuratedLocation(auth: AuthDto): Promise<CuratedLocationsResponseDto[]> {
|
||||
return this.assetRepositoryV1.getLocationsByUserId(auth.user.id);
|
||||
}
|
||||
|
||||
async getCuratedObject(auth: AuthDto): Promise<CuratedObjectsResponseDto[]> {
|
||||
return this.assetRepositoryV1.getDetectedObjectsByUserId(auth.user.id);
|
||||
}
|
||||
|
||||
async checkExistingAssets(
|
||||
auth: AuthDto,
|
||||
checkExistingAssetsDto: CheckExistingAssetsDto,
|
||||
|
||||
Reference in New Issue
Block a user