refactor phase 3a api-endpoint chunk 1 targeted actions imports
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user