chore: update response codes (#20770)

* chore: update response codes

* chore: skip problematic test
This commit is contained in:
Jason Rasmussen 2025-08-08 15:56:37 -04:00 committed by GitHub
parent 2ce4f8dd3b
commit 13563fc507
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 119 additions and 85 deletions

View file

@ -27,36 +27,36 @@ export class SearchController {
constructor(private service: SearchService) {}
@Post('metadata')
@HttpCode(HttpStatus.OK)
@Authenticated({ permission: Permission.AssetRead })
@HttpCode(HttpStatus.OK)
searchAssets(@Auth() auth: AuthDto, @Body() dto: MetadataSearchDto): Promise<SearchResponseDto> {
return this.service.searchMetadata(auth, dto);
}
@Post('statistics')
@HttpCode(HttpStatus.OK)
@Authenticated({ permission: Permission.AssetStatistics })
@HttpCode(HttpStatus.OK)
searchAssetStatistics(@Auth() auth: AuthDto, @Body() dto: StatisticsSearchDto): Promise<SearchStatisticsResponseDto> {
return this.service.searchStatistics(auth, dto);
}
@Post('random')
@HttpCode(HttpStatus.OK)
@Authenticated({ permission: Permission.AssetRead })
@HttpCode(HttpStatus.OK)
searchRandom(@Auth() auth: AuthDto, @Body() dto: RandomSearchDto): Promise<AssetResponseDto[]> {
return this.service.searchRandom(auth, dto);
}
@Post('large-assets')
@HttpCode(HttpStatus.OK)
@Authenticated({ permission: Permission.AssetRead })
@HttpCode(HttpStatus.OK)
searchLargeAssets(@Auth() auth: AuthDto, @Query() dto: LargeAssetSearchDto): Promise<AssetResponseDto[]> {
return this.service.searchLargeAssets(auth, dto);
}
@Post('smart')
@HttpCode(HttpStatus.OK)
@Authenticated({ permission: Permission.AssetRead })
@HttpCode(HttpStatus.OK)
searchSmart(@Auth() auth: AuthDto, @Body() dto: SmartSearchDto): Promise<SearchResponseDto> {
return this.service.searchSmart(auth, dto);
}