Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -29,6 +29,7 @@ class _webhooks extends \IPS\Api\Controller
|
||||
* @apiclientonly
|
||||
* @reqapiparam array events List of events to subscribe to
|
||||
* @reqapiparam string url URL to send webhook to
|
||||
* @apiparam string content_header The content type for the request.
|
||||
* @return \IPS\Api\Webhook
|
||||
* @throws 1C293/1 NO_EVENTS No events were specified
|
||||
* @throws 1C293/2 INVALID_URL The URL specified was not valid
|
||||
@@ -55,6 +56,10 @@ class _webhooks extends \IPS\Api\Controller
|
||||
$webhook->events = $events;
|
||||
$webhook->filters = ( \IPS\Request::i()->filters ?: array() );
|
||||
$webhook->url = $url;
|
||||
if( \IPS\Request::i()->content_header )
|
||||
{
|
||||
$webhook->content_type = \IPS\Request::i()->content_header;
|
||||
}
|
||||
$webhook->save();
|
||||
|
||||
return new \IPS\Api\Response( 201, $webhook->apiOutput() );
|
||||
|
||||
Reference in new issue
Block a user