Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

97
Views
Por qué actualizar Muchos no mangosta

No puedo resolver este problema. Otras palabras updateMany y updateOne no pueden funcionar:

 router.post('/deleteChat', async (req, res) => { if(!req.isAuthenticated()) return res.status(400).json({message: "User cant loginned"}); const {currentConversation} = req.body; try { await Messages.updateMany({ $and: [ {about: currentConversation._id}, {who_delete: { $nin: [req.user._id] } } ] }, {$push: {who_delete: req.user._id} } ) await Conversation.updateOne( {$and: [ {_id: currentConversation._id}, {status: {$nin: [req.user._id] } } ] }, {$push: {status: req.user._id }} ) return res.json() } catch (error) { return res.status(500).json({message: "Something wrong went!"}) } });

Quiero decir que si el usuario no puede dentro de la matriz, agregue la matriz de inserción. Pero no puedo hacer esto? ¿Qué necesito usar $ne o $nin ?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!