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

253
Views
Dice que el nombre de usuario/contraseña ingresado está vacío aunque no lo esté

Estoy creando una aplicación y en este momento estoy codificando el backend con express js en node js. Por alguna razón, dice que el nombre de usuario y la contraseña no son válidos.

Pruebas de back-end

 app.get("/signUp", async (req, res) => { const json = req.body; const user = await UserModel.findOne(json["username"]) if(!json["username"] || json["username"] === "" || !json["password"] || json["password"] === "") { return res.status(400).send({ "status": 400, "message": "Username and/or password is empty. New user was not created" }) } else if(user.type != null) { return res.status(409).send({ "status": 409, "message": "User already exists with given username. New user was not created." }) } else { await UserModel.create({ username: json["username"], password: json["password"] }) return res.status(200).send({ "status": 200, "message": "New user was created." }) }

})

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!