mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 15:38:59 +00:00
Fix webhooks (#7622)
* fix userServices.js * comply with eslint * Remove conversion to string
This commit is contained in:
parent
efeb2c1c8e
commit
57bb4d8c10
2 changed files with 5 additions and 5 deletions
|
|
@ -247,7 +247,7 @@ habitrpg.controller('SettingsCtrl',
|
|||
$scope.hasWebhooks = _.size(webhooks);
|
||||
})
|
||||
$scope.addWebhook = function(url) {
|
||||
User.addWebhook({body:{url:url, id:Shared.uuid()}});
|
||||
User.addWebhook({body:{url:url, enabled:true}});
|
||||
$scope._newWebhook.url = '';
|
||||
}
|
||||
$scope.saveWebhook = function(id,webhook) {
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ angular.module('habitrpg')
|
|||
$http({
|
||||
method: method,
|
||||
url: url + queryString,
|
||||
body: body,
|
||||
data: body,
|
||||
})
|
||||
.then(function (response) {
|
||||
if (response.data.message && response.data.message !== clientMessage) {
|
||||
|
|
@ -512,15 +512,15 @@ angular.module('habitrpg')
|
|||
},
|
||||
|
||||
addWebhook: function (data) {
|
||||
callOpsFunctionAndRequest('addWebhook', 'webhook', "POST", '', data, data.body);
|
||||
callOpsFunctionAndRequest('addWebhook', 'webhook', "POST", '', data);
|
||||
},
|
||||
|
||||
updateWebhook: function (data) {
|
||||
callOpsFunctionAndRequest('updateWebhook', 'webhook', "PUT", data.params.id, data, data.body);
|
||||
callOpsFunctionAndRequest('updateWebhook', 'webhook', "PUT", data.params.id, data);
|
||||
},
|
||||
|
||||
deleteWebhook: function (data) {
|
||||
callOpsFunctionAndRequest('deleteWebhook', 'webhook', "DELETE", data.params.id, data, data.body);
|
||||
callOpsFunctionAndRequest('deleteWebhook', 'webhook', "DELETE", data.params.id, data);
|
||||
},
|
||||
|
||||
sleep: function () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue