diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2017-01-20 03:02:05 +0100 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2017-01-19 23:02:05 -0300 |
commit | 48e1fa8aa0ae3234d826d16eaff39cb373bc7d3d (patch) | |
tree | c37ce0309861442288ae36f33064a66e576e58fd /webapp/actions/team_actions.jsx | |
parent | d3a285e64d051aa8d5c4c9854597dfbcce107675 (diff) | |
download | chat-48e1fa8aa0ae3234d826d16eaff39cb373bc7d3d.tar.gz chat-48e1fa8aa0ae3234d826d16eaff39cb373bc7d3d.tar.bz2 chat-48e1fa8aa0ae3234d826d16eaff39cb373bc7d3d.zip |
Move instances of Client.addUserToTeamFromInvite() in components to an action (#5132)
Diffstat (limited to 'webapp/actions/team_actions.jsx')
-rw-r--r-- | webapp/actions/team_actions.jsx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/webapp/actions/team_actions.jsx b/webapp/actions/team_actions.jsx index 3a86bada9..aa8628ba3 100644 --- a/webapp/actions/team_actions.jsx +++ b/webapp/actions/team_actions.jsx @@ -92,3 +92,21 @@ export function updateTeamMemberRoles(teamId, userId, newRoles, success, error) } ); } + +export function addUserToTeamFromInvite(data, hash, inviteId, success, error) { + Client.addUserToTeamFromInvite( + data, + hash, + inviteId, + (team) => { + if (success) { + success(team); + } + }, + (err) => { + if (error) { + error(err); + } + } + ); +} |