mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(server): asset search endpoint (#4931)
* feat(server): GET /assets endpoint * chore: open api * chore: use dumb name * feat: search by make, model, lens, city, state, country * chore: open api * chore: pagination validation and tests * chore: pr feedback
This commit is contained in:
parent
7a8f8e5472
commit
753dab8b3c
24 changed files with 3151 additions and 94 deletions
|
|
@ -4,6 +4,7 @@ import {
|
|||
AssetIdsDto,
|
||||
AssetJobsDto,
|
||||
AssetResponseDto,
|
||||
AssetSearchDto,
|
||||
AssetService,
|
||||
AssetStatsDto,
|
||||
AssetStatsResponseDto,
|
||||
|
|
@ -42,6 +43,19 @@ import { UseValidation, asStreamableFile } from '../app.utils';
|
|||
import { Route } from '../interceptors';
|
||||
import { UUIDParamDto } from './dto/uuid-param.dto';
|
||||
|
||||
@ApiTags('Asset')
|
||||
@Controller('assets')
|
||||
@Authenticated()
|
||||
@UseValidation()
|
||||
export class AssetsController {
|
||||
constructor(private service: AssetService) {}
|
||||
|
||||
@Get()
|
||||
searchAssets(@AuthUser() authUser: AuthUserDto, @Query() dto: AssetSearchDto): Promise<AssetResponseDto[]> {
|
||||
return this.service.search(authUser, dto);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiTags('Asset')
|
||||
@Controller(Route.ASSET)
|
||||
@Authenticated()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue