diff options
Diffstat (limited to 'lib/mattermost')
-rw-r--r-- | lib/mattermost/session.rb | 6 | ||||
-rw-r--r-- | lib/mattermost/team.rb | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/mattermost/session.rb b/lib/mattermost/session.rb index ef08bd46e17..65ccdb3c347 100644 --- a/lib/mattermost/session.rb +++ b/lib/mattermost/session.rb @@ -83,6 +83,12 @@ module Mattermost end end + def delete(path, options = {}) + handle_exceptions do + self.class.delete(path, options.merge(headers: @headers)) + end + end + private def create diff --git a/lib/mattermost/team.rb b/lib/mattermost/team.rb index b2511f3af1d..75513a9ba04 100644 --- a/lib/mattermost/team.rb +++ b/lib/mattermost/team.rb @@ -16,10 +16,9 @@ module Mattermost end # The deletion is done async, so the response is fast. - # On the mattermost side, this triggers an soft deletion first, after which - # the actuall data is removed + # On the mattermost side, this triggers an soft deletion def destroy(team_id:) - session_delete("/api/v4/teams/#{team_id}?permanent=true") + session_delete("/api/v4/teams/#{team_id}") end end end |