add api_root and removed token calls from methods
This commit is contained in:
@@ -22,7 +22,7 @@ const hashAPIPath = (queryPath) => {
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var searchString = req.query.searchString;
|
||||
var token = req.query.token;
|
||||
var token = await getToken();
|
||||
|
||||
var queryUrl =
|
||||
"incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
|
||||
@@ -34,7 +34,7 @@ export default async function ApiProxy(req, res) {
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
azureHeadersPaged(token)
|
||||
azureHeadersPaged(token.access_token)
|
||||
)
|
||||
.then(({ data }) => {
|
||||
res.status(200).json(data);
|
||||
|
||||
Reference in New Issue
Block a user