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
+4 -4
View File
@@ -44,7 +44,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import _ from "lodash";
import { getToken } from "../../../actions";
import { getToken } from "../../../actions/core/token";
import { getCaseBlob } from "../../../actions/azurestorage";
const WORDKEY = process.env.HASHKEY;
@@ -79,7 +79,7 @@ export default async function ApiProxy(req, res) {
"servicestage": 1,
"customerid_contact@odata.bind": "/contacts(" + contactid + ")",
"pinswg_appealcasetype": appealTypeId,
"pinswg_AssociatedLPA@odata.bind": "/accounts(" + lpaID + ")",
"pinswg_AssociatedLPA@odata.bind": "/accounts(" + lpaID + ")"
};
var newData = Object.assign(data, createCaseBody);
@@ -97,9 +97,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(newData),
data: JSON.stringify(newData)
};
var apiResponse = _.isEmpty(req.query)
? res.status(400).json()