GET params is in pascal case
MODIFY
src/server/rest/service/CarService.ts
src/server/rest/service/CarService.ts
@@ -45,7 +45,7 @@ export default class CarService {
'performanceAcceleration', 'rangeWLTP', 'rangeReal', 'efficiencyReal',
'chargeStandardPower', 'chargeStandardPhase', 'chargeStandardPhaseAmp', 'chargeAlternativePower', 'chargeOptionPower',
'chargeOptionPhaseAmp', 'chargeOptionPhase', 'chargeAlternativePhaseAmp', 'chargeAlternativePhase', 'chargePlug', 'fastChargePlug', 'fastChargePowerMax', 'drivetrainPowerHP'];
- if (filteredRequest.withImages) {
+ if (filteredRequest.WithImages) {
projectFields.push('image');
}
// Get the cars

MODIFY
src/server/rest/service/security/CarSecurity.ts
src/server/rest/service/security/CarSecurity.ts
@@ -25,7 +25,7 @@ export default class CarSecurity {
const filteredRequest: HttpCarCatalogsRequest = {
Search: sanitize(request.Search),
CarMaker: sanitize(request.CarMaker),
- withImages: UtilsSecurity.filterBoolean(request.withImages),
+ WithImages: UtilsSecurity.filterBoolean(request.WithImages),
} as HttpCarCatalogsRequest;
UtilsSecurity.filterSkipAndLimit(request, filteredRequest);
UtilsSecurity.filterSort(request, filteredRequest);

MODIFY
src/types/requests/HttpCarRequest.ts
src/types/requests/HttpCarRequest.ts
@@ -6,7 +6,7 @@ import { UserCar } from '../User';
export interface HttpCarCatalogsRequest extends HttpDatabaseRequest {
Search?: string;
CarMaker?: string;
- withImages?: boolean;
+ WithImages?: boolean;
}
export interface HttpCarMakersRequest extends HttpDatabaseRequest {

GET params is in pascal case