From 486c80bbd3993f86eff5a12ec440cca4267b3400 Mon Sep 17 00:00:00 2001 From: pupilcc Date: Sat, 30 Mar 2024 23:06:57 +0800 Subject: [PATCH] feat: login error message --- web/login.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/login.go b/web/login.go index 0a9fc93..2ead5bb 100644 --- a/web/login.go +++ b/web/login.go @@ -40,7 +40,7 @@ func login(c echo.Context) error { // Check in your db if the user exists or not if username != adminUsername || password != adminPassword { - return echo.ErrUnauthorized + return echo.NewHTTPError(http.StatusUnauthorized, "wrong username or password") } claims := &JWTCustomClaims{