Merge branch 'dev' into 'staging'
Update index.ts See merge request pena-services/hub_admin_backend_service!63
This commit is contained in:
commit
4d52ea8364
@ -75,13 +75,6 @@ export const createTariff = async (request: CreateTariffRequest, reply: FastifyR
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const privilege of requestBody.privileges) {
|
|
||||||
if (!Types.ObjectId.isValid(privilege.privilegeId)) {
|
|
||||||
void reply.status(404);
|
|
||||||
throw new Error(`privilege id <${privilege.privilegeId}> invalid`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const newTariff = new TariffModel({
|
const newTariff = new TariffModel({
|
||||||
name: requestBody.name,
|
name: requestBody.name,
|
||||||
price: requestBody.price,
|
price: requestBody.price,
|
||||||
|
Loading…
Reference in New Issue
Block a user