Skip to content

Commit

Permalink
Merge pull request #26 from LightAPIs/auth
Browse files Browse the repository at this point in the history
fix(auth): Fix an incorrect prompt for validation
  • Loading branch information
soulteary authored Dec 6, 2023
2 parents 2911236 + a69d187 commit be04f5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ func login(c *gin.Context) {
password := c.PostForm("password")

if strings.Trim(username, " ") == "" || strings.Trim(password, " ") == "" {
c.Data(http.StatusBadRequest, _HTMLContentType, internalErrorInput)
c.Data(http.StatusBadRequest, _HTMLContentType, internalErrorEmpty)
c.Abort()
return
}

if username != FlareState.AppFlags.User || password != FlareState.AppFlags.Pass {
c.Data(http.StatusBadRequest, _HTMLContentType, internalErrorEmpty)
c.Data(http.StatusBadRequest, _HTMLContentType, internalErrorInput)
c.Abort()
return
}
Expand Down

0 comments on commit be04f5c

Please sign in to comment.