aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/base/routes.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/base/routes.go b/plugins/base/routes.go
index f426c96..255faa5 100644
--- a/plugins/base/routes.go
+++ b/plugins/base/routes.go
@@ -366,7 +366,8 @@ func handleLogin(ctx *alps.Context) error {
s, err := ctx.Server.Sessions.Put(username, password)
if err != nil {
if _, ok := err.(alps.AuthError); ok {
- return ctx.Render(http.StatusOK, "login.html", &renderData)
+ renderData.BaseRenderData.GlobalData.Notice = "Failed to login!"
+ return ctx.Render(http.StatusUnauthorized, "login.html", &renderData)
}
return fmt.Errorf("failed to put connection in pool: %v", err)
}