add api_root and removed token calls from methods
This commit is contained in:
@@ -19,7 +19,7 @@ const hashAPIPath = (queryPath) => {
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var incidentID = req.query.incidentID;
|
||||
var token = req.query.token;
|
||||
var token = await getToken();
|
||||
|
||||
var queryUrl =
|
||||
"pinswg_representationses?$filter= _pinswg_case_value eq " +
|
||||
@@ -27,7 +27,10 @@ export default async function ApiProxy(req, res) {
|
||||
"&$count=true&$orderby=createdon desc";
|
||||
|
||||
return axios
|
||||
.get(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl), azureHeaders(token))
|
||||
.get(
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
azureHeaders(token.access_token)
|
||||
)
|
||||
.then(({ data }) => {
|
||||
res.status(200).json(data);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user