We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3882d5b commit 3b45904Copy full SHA for 3b45904
1 file changed
pkg/auth/auth.go
@@ -249,7 +249,11 @@ func (a *AuthRouter) renderLogin(c *gin.Context, passwordError string) {
249
PasswordError: passwordError,
250
}
251
c.Header("Content-Type", "text/html; charset=utf-8")
252
- c.Status(http.StatusBadRequest)
+ if passwordError != "" {
253
+ c.Status(http.StatusBadRequest)
254
+ } else {
255
+ c.Status(http.StatusOK)
256
+ }
257
if err := a.loginTemplate.Execute(c.Writer, data); err != nil {
258
c.AbortWithError(http.StatusInternalServerError, err)
259
return
0 commit comments