From c1f2e8a810df904b52e69377d400c666198daf7e Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 22 Aug 2022 13:11:54 -0500 Subject: [PATCH] Update sails.helpers.http.del usage (#7340) Co-authored-by: Mike McNeil --- website/api/controllers/webhooks/receive-from-github.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/api/controllers/webhooks/receive-from-github.js b/website/api/controllers/webhooks/receive-from-github.js index e4e237fb81..f577d2b06f 100644 --- a/website/api/controllers/webhooks/receive-from-github.js +++ b/website/api/controllers/webhooks/receive-from-github.js @@ -160,7 +160,7 @@ module.exports = { // } else { // let greenLabels = _.filter(issueOrPr.labels, ({color}) => color === GREEN_LABEL_COLOR); // await sails.helpers.flow.simultaneouslyForEach(greenLabels, async(greenLabel)=>{ - // await sails.helpers.http.delete('https://api.github.com/repos/'+encodeURIComponent(owner)+'/'+encodeURIComponent(repo)+'/issues/'+encodeURIComponent(issueNumber)+'/labels/'+encodeURIComponent(greenLabel.name), + // await sails.helpers.http.del('https://api.github.com/repos/'+encodeURIComponent(owner)+'/'+encodeURIComponent(repo)+'/issues/'+encodeURIComponent(issueNumber)+'/labels/'+encodeURIComponent(greenLabel.name), // {}, // { // 'User-Agent': 'Fleetie pie', @@ -351,7 +351,7 @@ module.exports = { if (!wasPostedByBot) { let greenLabels = _.filter(issueOrPr.labels, ({color}) => color === GREEN_LABEL_COLOR); await sails.helpers.flow.simultaneouslyForEach(greenLabels, async(greenLabel)=>{ - await sails.helpers.http.delete('https://api.github.com/repos/'+encodeURIComponent(owner)+'/'+encodeURIComponent(repo)+'/issues/'+encodeURIComponent(issueNumber)+'/labels/'+encodeURIComponent(greenLabel.name), + await sails.helpers.http.del('https://api.github.com/repos/'+encodeURIComponent(owner)+'/'+encodeURIComponent(repo)+'/issues/'+encodeURIComponent(issueNumber)+'/labels/'+encodeURIComponent(greenLabel.name), {}, { 'User-Agent': 'Fleetie Pie',