refactor phase 3a api-endpoint chunk 1 targeted actions imports

This commit is contained in:
2026-03-12 10:08:13 +00:00
parent 7bd5c7d833
commit e7882c9f78
10 changed files with 40 additions and 31 deletions
+6 -5
View File
@@ -12,7 +12,8 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { consoleLogger, getToken } from "../../../actions";
import { consoleLogger } from "../../../actions/core/logger";
import { getToken } from "../../../actions/core/token";
const WORDKEY = process.env.HASHKEY;
@@ -70,8 +71,8 @@ const recordExists = async (incidentId, contactId, token) => {
const res = await axios.get(url, {
headers: {
Authorization: "Bearer " + token.access_token,
Accept: "application/json",
},
Accept: "application/json"
}
});
if (res.data.value && res.data.value.length > 0) {
@@ -113,9 +114,9 @@ export default async function ApiProxy(req, res) {
Accept: "application/json",
Prefer: 'odata.include-annotations="*",return=representation',
Authorization: "Bearer " + token.access_token,
"Content-Type": "application/json",
"Content-Type": "application/json"
},
data: JSON.stringify(data),
data: JSON.stringify(data)
};
return axios(config)