From e38946d4dfce569389bce69a7d41c2ccba342ffd Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Thu, 28 Sep 2023 11:41:48 +0100 Subject: [PATCH] Change issue.services from Axios to Fetch Signed-off-by: Fred Boniface --- src/services/issue.services.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/issue.services.js b/src/services/issue.services.js index 8b7c8eb..641fa26 100644 --- a/src/services/issue.services.js +++ b/src/services/issue.services.js @@ -1,5 +1,5 @@ /* eslint-disable no-useless-escape */ -const axios = require("axios"); +//const axios = require("axios"); import { logger } from "../utils/logger.utils"; const issueLabels = { @@ -26,8 +26,10 @@ async function sendToGitea(body) { headers: { 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 client.*/ if (res.status == 201) {