This commit is contained in:
2026-02-28 23:00:57 +08:00
parent 686c3dcd4e
commit 461f2fc775
4 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -134,8 +134,8 @@ func LoginHandler(w http.ResponseWriter, r *http.Request) {
user, err := GetUserByUsername(req.Username)
if err != nil {
SendErrorResponse(w, http.StatusUnauthorized, "Invalid username")
postLog.Warning(fmt.Sprintf("[LoginHandler] Login failed: invalid username \"%s\"", req.Username))
SendErrorResponse(w, http.StatusUnauthorized, "User not exist")
postLog.Warning(fmt.Sprintf("[LoginHandler] Login failed: User not exist \"%s\"", req.Username))
return
}