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

319
Views
Recibo este error: Escriba '(err: Error) => void' no tiene propiedades en común con el tipo 'QueryOptions'.ts(2559) y no sé cuál es la causa

Aquí está mi ruta de "eliminar usuario":

Aquí está mi ruta de "eliminar usuario":

 app.post("/deleteuser", async (req, res) => { const { id } = req?.body; await User.findByIdAndDelete(id, (err: Error) => { if (err) throw err; }); res.send("success"); });
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

[SOLUCIONADO]

 app.post("/deleteuser", async (req, res) => { const { _id } = req?.body; try { await User.findByIdAndDelete(_id); res.send('success'); } catch (err) { res.status(500).json({ message: err.message }); } });
over 4 years ago · Santiago Trujillo Report
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!