summaryrefslogtreecommitdiff
path: root/lib/mattermost/command.rb
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2016-12-16 11:37:04 +0100
committerZ.J. van de Weg <git@zjvandeweg.nl>2016-12-16 11:37:04 +0100
commitbbeef3235b1d4255f73172447f252f6ee1325533 (patch)
tree01dcf6dad4002f098e9cdee79e6fec27d3adbfa3 /lib/mattermost/command.rb
parent80764241c78e8b5548fcf17fe07d5fbf8c7d1391 (diff)
downloadgitlab-ce-zj-command-failure.tar.gz
Update team methods [ci skip]zj-command-failure
Diffstat (limited to 'lib/mattermost/command.rb')
-rw-r--r--lib/mattermost/command.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/mattermost/command.rb b/lib/mattermost/command.rb
index 6a696201bee..b6446935eb6 100644
--- a/lib/mattermost/command.rb
+++ b/lib/mattermost/command.rb
@@ -1,7 +1,7 @@
module Mattermost
class Command < Session
def self.all(team_id)
- get("/api/v3/teams/#{team_id}/commands/list_team_commands")
+ get("/teams/#{team_id}/commands/list_team_commands").parsed_response
end
# params should be a hash, which supplies _at least_:
@@ -16,10 +16,13 @@ module Mattermost
description: 'Perform common operations on GitLab',
display_name: 'GitLab',
method: 'P',
- user_name: 'GitLab'
+ user_name: 'GitLab',
+ trigger: 'gitlab',
}.merge(params)
- post( "/api/v3/teams/#{team_id}/commands/create", command.to_json).parsed_response['token']
+ response = post( "/teams/#{team_id}/commands/create", body: command.to_json)
+
+ response.parsed_response['token']
end
end
end