summaryrefslogtreecommitdiffstats
path: root/api/team.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-06-02 18:39:23 -0400
committerenahum <nahumhbl@gmail.com>2016-06-02 19:39:23 -0300
commit8165f5d91fab1730fcef4832e4bfbe0323d911e0 (patch)
treeefbece2f089e98ca64d32f05bc99e18e89545b0d /api/team.go
parent3386c58d7c53131f0aa435abaf4cbb521d2f6049 (diff)
downloadchat-8165f5d91fab1730fcef4832e4bfbe0323d911e0.tar.gz
chat-8165f5d91fab1730fcef4832e4bfbe0323d911e0.tar.bz2
chat-8165f5d91fab1730fcef4832e4bfbe0323d911e0.zip
PLT-3131 Add slash command for sending email invites (#3218)
* Add slash command for sending email invites * Add response for empty message and trim commas * Check for @ in email addresses before sending * Update invite people error message
Diffstat (limited to 'api/team.go')
-rw-r--r--api/team.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/api/team.go b/api/team.go
index f65feb5dc..8eb7c4fef 100644
--- a/api/team.go
+++ b/api/team.go
@@ -39,7 +39,7 @@ func InitTeam() {
BaseRoutes.NeedTeam.Handle("/add_user_to_team", ApiUserRequired(addUserToTeam)).Methods("POST")
- // These should be moved to the global admain console
+ // These should be moved to the global admin console
BaseRoutes.NeedTeam.Handle("/import_team", ApiUserRequired(importTeam)).Methods("POST")
BaseRoutes.Teams.Handle("/add_user_to_team_from_invite", ApiUserRequired(addUserToTeamFromInvite)).Methods("POST")
}
@@ -399,12 +399,12 @@ func inviteMembers(c *Context, w http.ResponseWriter, r *http.Request) {
user = result.Data.(*model.User)
}
- ia := make([]string, len(invites.Invites))
+ emailList := make([]string, len(invites.Invites))
for _, invite := range invites.Invites {
- ia = append(ia, invite["email"])
+ emailList = append(emailList, invite["email"])
}
- InviteMembers(c, team, user, ia)
+ InviteMembers(c, team, user, emailList)
w.Write([]byte(invites.ToJson()))
}