From 78d5c4e2397f41c170e0b90832110278d8705874 Mon Sep 17 00:00:00 2001 From: LeonG11 Date: Wed, 27 May 2026 09:45:00 +0300 Subject: [PATCH] fix(backend)rename error code --- backend/handlers/user_handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/handlers/user_handler.go b/backend/handlers/user_handler.go index 501a4a4..5b3de82 100644 --- a/backend/handlers/user_handler.go +++ b/backend/handlers/user_handler.go @@ -21,7 +21,7 @@ func Login(c *gin.Context) { } if err := c.ShouldBindJSON(&input); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid input"}) + c.JSON(http.StatusBadRequest, gin.H{"error": "Неверный ввод"}) return } @@ -32,7 +32,7 @@ func Login(c *gin.Context) { passErr := bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(input.Password)) if err != nil || passErr != nil { - c.JSON(http.StatusUnauthorized, gin.H{"error": "Invalid login or password"}) + c.JSON(http.StatusUnauthorized, gin.H{"error": "Неверный логин или пароль"}) return }