Skip to content

Commit 3b45904

Browse files
hrntknrCopilot
andauthored
Update pkg/auth/auth.go
Co-authored-by: Copilot <[email protected]>
1 parent 3882d5b commit 3b45904

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pkg/auth/auth.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,11 @@ func (a *AuthRouter) renderLogin(c *gin.Context, passwordError string) {
249249
PasswordError: passwordError,
250250
}
251251
c.Header("Content-Type", "text/html; charset=utf-8")
252-
c.Status(http.StatusBadRequest)
252+
if passwordError != "" {
253+
c.Status(http.StatusBadRequest)
254+
} else {
255+
c.Status(http.StatusOK)
256+
}
253257
if err := a.loginTemplate.Execute(c.Writer, data); err != nil {
254258
c.AbortWithError(http.StatusInternalServerError, err)
255259
return

0 commit comments

Comments
 (0)