diff --git a/server/src/geolocations/geolocations.controller.ts b/server/src/geolocations/geolocations.controller.ts index 8f8586b..3660afe 100644 --- a/server/src/geolocations/geolocations.controller.ts +++ b/server/src/geolocations/geolocations.controller.ts @@ -37,8 +37,8 @@ export class GeolocationsController { @UseGuards(JwtAuthGuard) @ApiBearerAuth() @ApiOkResponsePaginated(GeolocationEntity) - async findAll(@Query() queryPagination?: QueryPaginationDto, @Query() playerFilter?: PlayerFilterDto): Promise> { - const [geolocations, total] = await this.geolocationsService.findAll(queryPagination, playerFilter) + async findAll(@Query() queryPagination: QueryPaginationDto, @Query() { playerId }: PlayerFilterDto): Promise> { + const [geolocations, total] = await this.geolocationsService.findAll(queryPagination, { playerId }) return paginateOutput(geolocations.map(geolocation => new GeolocationEntity(geolocation)), total, queryPagination) } diff --git a/server/src/money-updates/money-updates.controller.ts b/server/src/money-updates/money-updates.controller.ts index 3f911a7..557a633 100644 --- a/server/src/money-updates/money-updates.controller.ts +++ b/server/src/money-updates/money-updates.controller.ts @@ -38,8 +38,8 @@ export class MoneyUpdatesController { @UseGuards(JwtAuthGuard) @ApiBearerAuth() @ApiOkResponsePaginated(MoneyUpdateEntity) - async findAll(@Query() queryPagination: QueryPaginationDto, @Query() playerFilter: PlayerFilterDto): Promise> { - const [trains, total] = await this.moneyUpdatesService.findAll(queryPagination, playerFilter) + async findAll(@Query() queryPagination: QueryPaginationDto, @Query() { playerId }: PlayerFilterDto): Promise> { + const [trains, total] = await this.moneyUpdatesService.findAll(queryPagination, { playerId }) return paginateOutput(trains.map(train => new MoneyUpdateEntity(train)), total, queryPagination) } diff --git a/server/src/trains/trains.controller.ts b/server/src/trains/trains.controller.ts index 1b09c61..7ee66c7 100644 --- a/server/src/trains/trains.controller.ts +++ b/server/src/trains/trains.controller.ts @@ -41,8 +41,8 @@ export class TrainsController { @UseGuards(JwtAuthGuard) @ApiBearerAuth() @ApiOkResponsePaginated(TrainEntity) - async findAll(@Query() queryPagination: QueryPaginationDto, @Query() playerFilter: PlayerFilterDto): Promise> { - const [trains, total] = await this.trainsService.findAll(queryPagination, playerFilter) + async findAll(@Query() queryPagination: QueryPaginationDto, @Query() { playerId }: PlayerFilterDto): Promise> { + const [trains, total] = await this.trainsService.findAll(queryPagination, { playerId }) return paginateOutput(trains.map(train => new TrainEntity(train)), total, queryPagination) }