Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- projects: [
- {
- type: Schema.Types.ObjectId,
- ref: 'Project'
- }
- ]
- const client = await Client.updateOne(
- { _id: req.body.client_id },
- {
- $pullAll: { projects: [req.body.project_id] }
- }
- );
- const client = await Client.updateOne(
- { _id: req.body.client_id },
- {
- $pullAll: { projects: req.body.project_id }
- }
- );
- const client = await Client.updateOne(
- { _id: req.body.client_id },
- {
- $pullAll: { projects: { $in: [ req.body.project_id ] } }
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement