diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-02-02 15:04:02 +0100 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-02-16 09:17:40 +0100 |
commit | 297dc70158f905fef4557d1ee6510bcf459a08a9 (patch) | |
tree | b35fa5508d947f1d19e644ac9b1149145f9bb45a /lib/mattermost | |
parent | e90ec73f651ca6153a72437d4dd01f60c38839da (diff) | |
download | gitlab-ce-297dc70158f905fef4557d1ee6510bcf459a08a9.tar.gz |
Create MM team for GitLab group
Diffstat (limited to 'lib/mattermost')
-rw-r--r-- | lib/mattermost/session.rb | 2 | ||||
-rw-r--r-- | lib/mattermost/team.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/mattermost/session.rb b/lib/mattermost/session.rb index 377cb7b1021..d4b4ba97f8c 100644 --- a/lib/mattermost/session.rb +++ b/lib/mattermost/session.rb @@ -153,7 +153,7 @@ module Mattermost yield rescue HTTParty::Error => e raise Mattermost::ConnectionError.new(e.message) - rescue Errno::ECONNREFUSED + rescue Errno::ECONNREFUSED => e raise Mattermost::ConnectionError.new(e.message) end end diff --git a/lib/mattermost/team.rb b/lib/mattermost/team.rb index 09dfd082b3a..9e80f7f8571 100644 --- a/lib/mattermost/team.rb +++ b/lib/mattermost/team.rb @@ -1,7 +1,12 @@ module Mattermost class Team < Client + # Returns **all** teams for an admin def all session_get('/api/v3/teams/all') end + + def create(params) + session_post('/api/v3/teams/create', body: params.to_json) + end end end |