summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2017-03-23 13:50:06 +0100
committerGeorge Goldberg <george@gberg.me>2017-03-23 12:50:06 +0000
commit34cb70d005ba5ebea7398646db6e242baa81b701 (patch)
tree086f4bd61c82aa0b807df028ab1dab63e19b7dc6 /model
parent94b4aa082c456914d89d9926d06814bd17309a73 (diff)
downloadchat-34cb70d005ba5ebea7398646db6e242baa81b701.tar.gz
chat-34cb70d005ba5ebea7398646db6e242baa81b701.tar.bz2
chat-34cb70d005ba5ebea7398646db6e242baa81b701.zip
add implementation for endpoint DELETE outgoing webhook for apiv4 (#5828)
Diffstat (limited to 'model')
-rw-r--r--model/client4.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/model/client4.go b/model/client4.go
index 5b7f502e1..ae20d5293 100644
--- a/model/client4.go
+++ b/model/client4.go
@@ -1383,6 +1383,16 @@ func (c *Client4) RegenOutgoingHookToken(hookId string) (*OutgoingWebhook, *Resp
}
}
+// DeleteOutgoingWebhook delete the outgoing webhook on the system requested by Hook Id.
+func (c *Client4) DeleteOutgoingWebhook(hookId string) (bool, *Response) {
+ if r, err := c.DoApiDelete(c.GetOutgoingWebhookRoute(hookId)); err != nil {
+ return false, &Response{StatusCode: r.StatusCode, Error: err}
+ } else {
+ defer closeBody(r)
+ return CheckStatusOK(r), BuildResponse(r)
+ }
+}
+
// Preferences Section
// GetPreferences returns the user's preferences.