Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4dfe14 commit 625e3c4Copy full SHA for 625e3c4
packages/plugin-cars-api/src/graphql/resolvers/mutations/cars.ts
@@ -223,10 +223,12 @@ const carMutations = {
223
mainTypeId: car._id,
224
relTypes: ['customer', 'company'],
225
},
226
+ isRPC: true,
227
+ defaultValue: []
228
});
229
- if (!relTypeIds.includes(customerId) && !relTypeIds.includes(companyId)) {
- throw new Error ('Cant edit this car, not a customer or company car')
230
+ if (!relTypeIds?.includes(customerId) && !relTypeIds?.includes(companyId)) {
231
+ throw new Error('Cant edit this car, not a customer or company car')
232
}
233
234
const updated = await models.Cars.updateCar(_id, doc);
0 commit comments