forked from Yara724/api
add 4 new fields for expert approval
This commit is contained in:
@@ -314,6 +314,16 @@ export class LookupsController {
|
||||
description: "Max rows (1–100, default 50)",
|
||||
example: 50,
|
||||
})
|
||||
@ApiQuery({
|
||||
name: "vehicleGroupId",
|
||||
required: false,
|
||||
description: "Only return kinds belonging to this Fanavaran vehicle group",
|
||||
})
|
||||
@ApiQuery({
|
||||
name: "vehicleSystemId",
|
||||
required: false,
|
||||
description: "Only return kinds belonging to this Fanavaran vehicle system",
|
||||
})
|
||||
@ApiOkResponse({
|
||||
description: "Matched active vehicle kinds with echoed query",
|
||||
schema: {
|
||||
@@ -338,10 +348,20 @@ export class LookupsController {
|
||||
async getVehicleList(
|
||||
@Query("q") q?: string,
|
||||
@Query("limit") limit?: string,
|
||||
@Query("vehicleGroupId") vehicleGroupId?: string,
|
||||
@Query("vehicleSystemId") vehicleSystemId?: string,
|
||||
) {
|
||||
return await this.lookupsService.searchVehicleKindsList({
|
||||
q,
|
||||
limit: limit != null && limit !== "" ? Number(limit) : undefined,
|
||||
vehicleGroupId:
|
||||
vehicleGroupId != null && vehicleGroupId !== ""
|
||||
? Number(vehicleGroupId)
|
||||
: undefined,
|
||||
vehicleSystemId:
|
||||
vehicleSystemId != null && vehicleSystemId !== ""
|
||||
? Number(vehicleSystemId)
|
||||
: undefined,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user