Correction filtrage API
This commit is contained in:
parent
246dae446f
commit
a4a0981b2c
@ -37,8 +37,8 @@ export class GeolocationsController {
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@ApiOkResponsePaginated(GeolocationEntity)
|
||||
async findAll(@Query() queryPagination?: QueryPaginationDto, @Query() playerFilter?: PlayerFilterDto): Promise<PaginateOutputDto<GeolocationEntity>> {
|
||||
const [geolocations, total] = await this.geolocationsService.findAll(queryPagination, playerFilter)
|
||||
async findAll(@Query() queryPagination: QueryPaginationDto, @Query() { playerId }: PlayerFilterDto): Promise<PaginateOutputDto<GeolocationEntity>> {
|
||||
const [geolocations, total] = await this.geolocationsService.findAll(queryPagination, { playerId })
|
||||
return paginateOutput<GeolocationEntity>(geolocations.map(geolocation => new GeolocationEntity(geolocation)), total, queryPagination)
|
||||
}
|
||||
|
||||
|
@ -38,8 +38,8 @@ export class MoneyUpdatesController {
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@ApiOkResponsePaginated(MoneyUpdateEntity)
|
||||
async findAll(@Query() queryPagination: QueryPaginationDto, @Query() playerFilter: PlayerFilterDto): Promise<PaginateOutputDto<MoneyUpdateEntity>> {
|
||||
const [trains, total] = await this.moneyUpdatesService.findAll(queryPagination, playerFilter)
|
||||
async findAll(@Query() queryPagination: QueryPaginationDto, @Query() { playerId }: PlayerFilterDto): Promise<PaginateOutputDto<MoneyUpdateEntity>> {
|
||||
const [trains, total] = await this.moneyUpdatesService.findAll(queryPagination, { playerId })
|
||||
return paginateOutput<MoneyUpdateEntity>(trains.map(train => new MoneyUpdateEntity(train)), total, queryPagination)
|
||||
}
|
||||
|
||||
|
@ -41,8 +41,8 @@ export class TrainsController {
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@ApiOkResponsePaginated(TrainEntity)
|
||||
async findAll(@Query() queryPagination: QueryPaginationDto, @Query() playerFilter: PlayerFilterDto): Promise<PaginateOutputDto<TrainEntity>> {
|
||||
const [trains, total] = await this.trainsService.findAll(queryPagination, playerFilter)
|
||||
async findAll(@Query() queryPagination: QueryPaginationDto, @Query() { playerId }: PlayerFilterDto): Promise<PaginateOutputDto<TrainEntity>> {
|
||||
const [trains, total] = await this.trainsService.findAll(queryPagination, { playerId })
|
||||
return paginateOutput<TrainEntity>(trains.map(train => new TrainEntity(train)), total, queryPagination)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user