summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/channel.go2
-rw-r--r--api/team.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/api/channel.go b/api/channel.go
index de39ad1a8..a27b3c1bf 100644
--- a/api/channel.go
+++ b/api/channel.go
@@ -368,7 +368,7 @@ func getChannels(c *Context, w http.ResponseWriter, r *http.Request) {
// user is already in the team
if result := <-Srv.Store.Channel().GetChannels(c.Session.TeamId, c.Session.UserId); result.Err != nil {
- if result.Err.Message == "No channels were found" { // store translation dependant
+ if result.Err.Id == "store.sql_channel.get_channels.not_found.app_error" {
// lets make sure the user is valid
if result := <-Srv.Store.User().Get(c.Session.UserId); result.Err != nil {
c.Err = result.Err
diff --git a/api/team.go b/api/team.go
index 779a6affe..8b25e3316 100644
--- a/api/team.go
+++ b/api/team.go
@@ -494,7 +494,7 @@ func inviteMembers(c *Context, w http.ResponseWriter, r *http.Request) {
var invNum int64 = 0
for i, invite := range invites.Invites {
- if result := <-Srv.Store.User().GetByEmail(c.Session.TeamId, invite["email"]); result.Err == nil || result.Err.Message != store.MISSING_ACCOUNT_ERROR {
+ if result := <-Srv.Store.User().GetByEmail(c.Session.TeamId, invite["email"]); result.Err == nil || result.Err.Id != store.MISSING_ACCOUNT_ERROR {
invNum = int64(i)
c.Err = model.NewLocAppError("invite_members", "api.team.invite_members.already.app_error", nil, strconv.FormatInt(invNum, 10))
return