mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
fix(server): validate listens report query params
When using Omit<>, class-validator can not see the decorators of the base type and skips validation.
This commit is contained in:
parent
40ce26eadd
commit
6f8fc0265a
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ export class ReportsController {
|
|||
@Get("listens")
|
||||
@Auth()
|
||||
async getListens(
|
||||
@Query() options: Omit<GetListenReportDto, "user">,
|
||||
@Query() options: GetListenReportDto,
|
||||
@ReqUser() user: User
|
||||
): Promise<ListenReportDto> {
|
||||
return this.reportsService.getListens({ ...options, user });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue