summaryrefslogtreecommitdiffstats
path: root/app/team.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/team.go')
-rw-r--r--app/team.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/team.go b/app/team.go
index 0bed7e9a3..94523f8b5 100644
--- a/app/team.go
+++ b/app/team.go
@@ -199,12 +199,12 @@ func AddUserToTeamByHash(userId string, hash string, data string) (*model.Team,
props := model.MapFromJson(strings.NewReader(data))
if hash != utils.HashSha256(fmt.Sprintf("%v:%v", data, utils.Cfg.EmailSettings.InviteSalt)) {
- return nil, model.NewLocAppError("JoinUserToTeamByHash", "api.user.create_user.signup_link_invalid.app_error", nil, "")
+ return nil, model.NewAppError("JoinUserToTeamByHash", "api.user.create_user.signup_link_invalid.app_error", nil, "", http.StatusBadRequest)
}
t, timeErr := strconv.ParseInt(props["time"], 10, 64)
if timeErr != nil || model.GetMillis()-t > 1000*60*60*48 { // 48 hours
- return nil, model.NewLocAppError("JoinUserToTeamByHash", "api.user.create_user.signup_link_expired.app_error", nil, "")
+ return nil, model.NewAppError("JoinUserToTeamByHash", "api.user.create_user.signup_link_expired.app_error", nil, "", http.StatusBadRequest)
}
tchan := Srv.Store.Team().Get(props["id"])