From 1b3979316f726fe22fd0f589902014a6e44b5e8a Mon Sep 17 00:00:00 2001 From: aovantsev Date: Fri, 3 Oct 2025 16:18:37 +0300 Subject: [PATCH] add logs --- auth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth.go b/auth.go index a7396d6..a4ab630 100644 --- a/auth.go +++ b/auth.go @@ -182,7 +182,7 @@ func LoginHandler(c *gin.Context) { ).Scan(&user.ID, &user.Username, &user.Email, &user.Password, &user.CreatedAt, &user.UpdatedAt) if err == sql.ErrNoRows { - c.JSON(http.StatusUnauthorized, gin.H{"error": "Invalid credentials"}) + c.JSON(http.StatusUnauthorized, gin.H{"error": "Invalid credentials 1"}) return } else if err != nil { c.JSON(http.StatusInternalServerError, gin.H{"error": "Database error"}) @@ -191,7 +191,7 @@ func LoginHandler(c *gin.Context) { // Check password if !checkPasswordHash(req.Password, user.Password) { - c.JSON(http.StatusUnauthorized, gin.H{"error": "Invalid credentials"}) + c.JSON(http.StatusUnauthorized, gin.H{"error": "Invalid credentials 2"}) return }