fix(backend)rename error code

This commit is contained in:
2026-05-27 09:45:00 +03:00
parent fe2b30f48f
commit 78d5c4e239
+2 -2
View File
@@ -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
}