Merge branch 'dev' into 'staging'

Update index.ts

See merge request pena-services/hub_admin_backend_service!63
This commit is contained in:
Mikhail 2023-09-16 17:48:12 +00:00
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,