summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorElias Nahum <nahumhbl@gmail.com>2016-01-25 16:08:06 -0300
committerElias Nahum <nahumhbl@gmail.com>2016-01-25 16:23:57 -0300
commit69fbea225e4439775c9f3b8f5e5cabded0a5bf55 (patch)
tree6383f3c3a94896bfa9fe9b89f7fb744f08c91288 /api
parent1701a2cbbe698c96544c275f41d7dbff4b88fd0c (diff)
downloadchat-69fbea225e4439775c9f3b8f5e5cabded0a5bf55.tar.gz
chat-69fbea225e4439775c9f3b8f5e5cabded0a5bf55.tar.bz2
chat-69fbea225e4439775c9f3b8f5e5cabded0a5bf55.zip
PLT-7: Refactoring stores to use translations (chunk 7)
- Add spanish translations
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