summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-30 08:24:18 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-30 08:24:18 -0500
commitc328be631b5d83da9d65c2c5a49b42cfa9007bbf (patch)
treee9b377072e98608f92aa7c49f7f496fec2f23d71
parentf1629174a36cbfbf2594e850c8aef7f06ad9cc3e (diff)
parent911e430b3ffca052871cad9c0ecc532bd5d75785 (diff)
downloadchat-c328be631b5d83da9d65c2c5a49b42cfa9007bbf.tar.gz
chat-c328be631b5d83da9d65c2c5a49b42cfa9007bbf.tar.bz2
chat-c328be631b5d83da9d65c2c5a49b42cfa9007bbf.zip
Merge pull request #1536 from florianorben/login-failed-msg
Set correct http status code for login failures/wrong email
-rw-r--r--api/user.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/api/user.go b/api/user.go
index 3281e83e2..62947d8fd 100644
--- a/api/user.go
+++ b/api/user.go
@@ -334,6 +334,7 @@ func LoginByEmail(c *Context, w http.ResponseWriter, r *http.Request, email, nam
if result := <-Srv.Store.User().GetByEmail(team.Id, email); result.Err != nil {
c.Err = result.Err
+ c.Err.StatusCode = http.StatusForbidden
return nil
} else {
user := result.Data.(*model.User)