summaryrefslogtreecommitdiff
path: root/lib/mattermost/client.rb
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-05-14 12:57:08 +0200
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-07-28 09:09:55 +0200
commitd7062dd042f7dd773900ecf6ea79e1ca26592eb5 (patch)
tree07656fcfb6911d9136c464f262806357ab518652 /lib/mattermost/client.rb
parentb92d5135d8522e1370636799d74b51f9a37d0b2f (diff)
downloadgitlab-ce-d7062dd042f7dd773900ecf6ea79e1ca26592eb5.tar.gz
Remove Mattermost team with GitLab group
When destroying a group, now an API call is made to the Mattermost server to request the deletion of the project. Actual team deletion on the Mattermost side happens async, so the runtime shouldn't increase by more than a second.
Diffstat (limited to 'lib/mattermost/client.rb')
-rw-r--r--lib/mattermost/client.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/mattermost/client.rb b/lib/mattermost/client.rb
index 3d60618006c..d80cd7d2a4e 100644
--- a/lib/mattermost/client.rb
+++ b/lib/mattermost/client.rb
@@ -24,6 +24,10 @@ module Mattermost
json_response session.post(path, options)
end
+ def delete(session, path, options)
+ json_response session.delete(path, options)
+ end
+
def session_get(path, options = {})
with_session do |session|
get(session, path, options)
@@ -36,6 +40,12 @@ module Mattermost
end
end
+ def session_delete(path, options = {})
+ with_session do |session|
+ delete(session, path, options)
+ end
+ end
+
def json_response(response)
json_response = JSON.parse(response.body)