feat(server): add /search/statistics resource (#18885)

This commit is contained in:
Jonathan Gilbert 2025-06-07 11:12:53 +10:00 committed by GitHub
parent ecb16d9907
commit fb4be6e231
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 954 additions and 16 deletions

View file

@ -11,8 +11,10 @@ import {
SearchPeopleDto,
SearchPlacesDto,
SearchResponseDto,
SearchStatisticsResponseDto,
SearchSuggestionRequestDto,
SmartSearchDto,
StatisticsSearchDto,
} from 'src/dtos/search.dto';
import { Auth, Authenticated } from 'src/middleware/auth.guard';
import { SearchService } from 'src/services/search.service';
@ -29,6 +31,13 @@ export class SearchController {
return this.service.searchMetadata(auth, dto);
}
@Post('statistics')
@HttpCode(HttpStatus.OK)
@Authenticated()
searchAssetStatistics(@Auth() auth: AuthDto, @Body() dto: StatisticsSearchDto): Promise<SearchStatisticsResponseDto> {
return this.service.searchStatistics(auth, dto);
}
@Post('random')
@HttpCode(HttpStatus.OK)
@Authenticated()