Change issue.services from Axios to Fetch

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-09-28 11:41:48 +01:00
parent d395b65512
commit e38946d4df
1 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/* eslint-disable no-useless-escape */ /* eslint-disable no-useless-escape */
const axios = require("axios"); //const axios = require("axios");
import { logger } from "../utils/logger.utils"; import { logger } from "../utils/logger.utils";
const issueLabels = { const issueLabels = {
@ -26,8 +26,10 @@ async function sendToGitea(body) {
headers: { headers: {
Authorization: key, Authorization: key,
}, },
body: body,
}; };
var res = await axios.post(url, body, opts); //var res = await axios.post(url, body, opts);
const res = await fetch(url, opts);
/* Need to read the output from the POST and pass the result upwards to the /* Need to read the output from the POST and pass the result upwards to the
client.*/ client.*/
if (res.status == 201) { if (res.status == 201) {