app.js
@@ -45,8 +45,8 @@ .get("/api/user/login/:login", async function (req, res) { const {login} = req.params const user = await db.getUserByLogin(login) if (user.length) { return res.send(user[0]) if (user) { return res.send(user) } else { return res.code(404).send({status: "error", msg: "not found"}) @@ -125,7 +125,7 @@ }) .get("/api/kurs/items/:refId", async function (req, res) { const {refId} = req.params let data = await db.getKursItems(refId) let data = await db.getKursItems2(refId) if (data) { return res.send(data) }