From d69f94bb31bfd2eb44018822f944f432d5851ce2 Mon Sep 17 00:00:00 2001
From: alex <alex@alexloehr.net>
Date: Thu, 05 Jun 2025 09:41:24 +0000
Subject: [PATCH] adding create_date

---
 app.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app.js b/app.js
index cc1bd5b..f74787a 100644
--- a/app.js
+++ b/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"})

--
Gitblit v1.8.0