Update index.ts
This commit is contained in:
parent
3c7a95705e
commit
ee00fc3ac7
@ -75,13 +75,6 @@ export const createTariff = async (request: CreateTariffRequest, reply: FastifyR
|
||||
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({
|
||||
name: requestBody.name,
|
||||
price: requestBody.price,
|
||||
|
Loading…
Reference in New Issue
Block a user