* feat(webhook) EE-2125 add some helpers to registry utils * feat(webhook) EE-2125 persist registryID when creating a webhook * feat(webhook) EE-2125 send registry auth header when executing a webhook * feat(webhook) EE-2125 send registryID to backend when creating a service with webhook * feat(webhook) EE-2125 use the initial registry ID to create webhook on editing service screen * feat(webhook) EE-2125 update webhook when update registry * feat(webhook) EE-2125 add endpoint of update webhook * feat(webhook) EE-2125 code cleanup * feat(webhook) EE-2125 fix a typo * feat(webhook) EE-2125 fix circle import issue with unit test Co-authored-by: Simon Meng <simon.meng@portainer.io>
18 lines
483 B
JavaScript
18 lines
483 B
JavaScript
angular.module('portainer.app').factory('Webhooks', [
|
|
'$resource',
|
|
'API_ENDPOINT_WEBHOOKS',
|
|
function WebhooksFactory($resource, API_ENDPOINT_WEBHOOKS) {
|
|
'use strict';
|
|
return $resource(
|
|
API_ENDPOINT_WEBHOOKS + '/:id',
|
|
{},
|
|
{
|
|
query: { method: 'GET', isArray: true },
|
|
create: { method: 'POST' },
|
|
update: { method: 'PUT', params: { id: '@id' } },
|
|
remove: { method: 'DELETE', params: { id: '@id' } },
|
|
}
|
|
);
|
|
},
|
|
]);
|