signin.go: change login failed msg
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3c240d3588
commit
3cacea8c1f
@ -80,6 +80,8 @@ func SigninPost(client *ent.Client) echo.HandlerFunc {
|
||||
)
|
||||
}
|
||||
|
||||
loginFailed := "Login Failed!"
|
||||
|
||||
ctx := context.WithValue(context.Background(), moduser.CtxKey{}, slogger)
|
||||
if usr, err := moduser.QueryUser(ctx, client, username); err == nil {
|
||||
log.Info("attempting login", "user", &usr.ID)
|
||||
@ -87,7 +89,7 @@ func SigninPost(client *ent.Client) echo.HandlerFunc {
|
||||
if !passwd.Compare(usr.Password, password) {
|
||||
log.Warn("wrong credentials", "user", &usr.ID)
|
||||
|
||||
data["flash"] = "wrong credentials"
|
||||
data["flash"] = loginFailed
|
||||
data["form"] = cu
|
||||
p.Data = data
|
||||
|
||||
@ -110,7 +112,7 @@ func SigninPost(client *ent.Client) echo.HandlerFunc {
|
||||
}
|
||||
|
||||
data["form"] = cu
|
||||
data["flash"] = "wrong credentials"
|
||||
data["flash"] = loginFailed
|
||||
p.Data = data
|
||||
|
||||
return c.Render(
|
||||
|
Loading…
Reference in New Issue
Block a user