summaryrefslogtreecommitdiff
path: root/lib/mattermost/command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mattermost/command.rb')
-rw-r--r--lib/mattermost/command.rb13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/mattermost/command.rb b/lib/mattermost/command.rb
index 9c37d0b0d79..830e61b015e 100644
--- a/lib/mattermost/command.rb
+++ b/lib/mattermost/command.rb
@@ -1,14 +1,7 @@
module Mattermost
- class Command < Session
- def self.create(team_id, trigger: 'gitlab', url:, icon_url:)
-
- post_command(command)['token']
- end
-
- private
-
- def post_command(command)
- post( "/teams/#{team_id}/commands/create", body: command.to_json).parsed_response
+ class Command
+ def self.create(session, team_id, command)
+ session.post("/api/v3/teams/#{team_id}/commands/create", body: command.to_json)['token']
end
end
end