updated to remove obsolete token calls

This commit is contained in:
2021-11-26 14:23:20 +00:00
parent 37218655b4
commit a626b212d1
2 changed files with 23 additions and 31 deletions
+18 -10
View File
@@ -21,28 +21,36 @@ NEXT_PUBLIC_HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459
//Test Oauth //Test Oauth
CLIENT_ID = 6619ad85-c908-490d-811b-de8c93c0f2aa //CLIENT_ID = 6619ad85-c908-490d-811b-de8c93c0f2aa
CLIENT_SECRET = qKo7Q~5QvLEplbwnBbint_I5lXqx_-kDm8Vj- //CLIENT_SECRET = qKo7Q~5QvLEplbwnBbint_I5lXqx_-kDm8Vj-
//test //test
RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/ //RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/
RELAYURI = "test-pedw-ns.servicebus.windows.net" //RELAYURI = "test-pedw-ns.servicebus.windows.net"
RELAYPATH = "test-pedw-hc" //RELAYPATH = "test-pedw-hc"
//SASKEY = "kTLrs9UHwuW9Msc9uNfjf+89qLYT6ly80lK0zdTYJW4=" //SASKEY = "kTLrs9UHwuW9Msc9uNfjf+89qLYT6ly80lK0zdTYJW4="
//SASKEYNAME = "testpedwhcpolicy" //SASKEYNAME = "testpedwhcpolicy"
//Preprod Oauth //Preprod Oauth
//CLIENT_ID = 6619ad85-c908-490d-811b-de8c93c0f2aa CLIENT_ID = 75594242-8773-45c7-a3da-85e62485b2f3
/CLIENT_SECRET = qKo7Q~5QvLEplbwnBbint_I5lXqx_-kDm8Vj- CLIENT_SECRET = UDF7Q~OwTLIV7LXPHlIYHSWbJunlBD53ieLt-
//preprod //preprod
//RELAY_ROOT = https://pp-pedw-ns.servicebus.windows.net/pp-pedw-hc/ RELAY_ROOT = https://pp-pedw-ns.servicebus.windows.net/pp-pedw-hc/
//RELAYURI = "pp-pedw-ns.servicebus.windows.net" RELAYURI = "pp-pedw-ns.servicebus.windows.net"
//RELAYPATH = "pp-pedw-hc" RELAYPATH = "pp-pedw-hc"
//SASKEY = "JzrOYfMTsGBD1cZHH2nkzqsbfDCqg0brO6jyiIDNVPo=" //SASKEY = "JzrOYfMTsGBD1cZHH2nkzqsbfDCqg0brO6jyiIDNVPo="
//SASKEYNAME = "pppedwnspolicy" //SASKEYNAME = "pppedwnspolicy"
//Prod Oauth
//CLIENT_ID = 01904c07-9035-4cf9-a535-3945f6e470d2
//CLIENT_SECRET = PRo7Q~GQoKSdARRqF-NOXQDx2Ka8UCINyvagk
GOOGLE_TAG_MANAGER = GTM-T78CBC3 GOOGLE_TAG_MANAGER = GTM-T78CBC3
SHOWLOGIN = "true" SHOWLOGIN = "true"
SHOWREPRESENTATIONS = "false" SHOWREPRESENTATIONS = "false"
+5 -21
View File
@@ -185,8 +185,6 @@ export const getBasicDNSSearch = (token, searchString) => {
}; };
export const getBasicDNSSearchPaged = (pageNumber) => { export const getBasicDNSSearchPaged = (pageNumber) => {
var token = getToken();
var queryUrl = var queryUrl =
"/api/proxy/incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true" + "/api/proxy/incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true" +
(typeof pageNumber != "undefined" (typeof pageNumber != "undefined"
@@ -254,8 +252,6 @@ export const getAdvancedSearch = (token, searchString) => {
export const getAdvancedSearchPaged = (searchString, pageNumber) => { export const getAdvancedSearchPaged = (searchString, pageNumber) => {
//console.log(searchString); //console.log(searchString);
var token = getToken();
var queryString = ""; var queryString = "";
queryString += queryString +=
@@ -390,7 +386,6 @@ export const getSearchDocumentHistory = (token, documentID) => {
export const getSearchDocumentDetailsPaged = (incidentID, pageNumber) => { export const getSearchDocumentDetailsPaged = (incidentID, pageNumber) => {
console.log(incidentID); console.log(incidentID);
var token = getToken();
var queryUrl = var queryUrl =
"/api/proxy/pinswg_documents?$count=true&$filter=_pinswg_documentids_value eq " + "/api/proxy/pinswg_documents?$count=true&$filter=_pinswg_documentids_value eq " +
@@ -410,8 +405,6 @@ export const getSearchDocumentDetailsPaged = (incidentID, pageNumber) => {
}; };
export const getSearchDocumentHistoryPaged = (documentID, pageNumber) => { export const getSearchDocumentHistoryPaged = (documentID, pageNumber) => {
var token = getToken();
var queryUrl = var queryUrl =
"/api/proxy/pinswg_documenthistories?$count=true&$select=_pinswg_documentid_value,pinswg_createddate,pinswg_state,pinswg_fileexists,statecode,pinswg_publisheddate&$filter=_pinswg_documentid_value eq " + "/api/proxy/pinswg_documenthistories?$count=true&$select=_pinswg_documentid_value,pinswg_createddate,pinswg_state,pinswg_fileexists,statecode,pinswg_publisheddate&$filter=_pinswg_documentid_value eq " +
documentID + documentID +
@@ -503,8 +496,6 @@ export const getBasicDNSSearchDetails = (token, appealType, caseReference) => {
}; };
export const getBasicDNSSearchDetailsPaged = (caseReference) => { export const getBasicDNSSearchDetailsPaged = (caseReference) => {
var token = getToken();
var queryUrl = var queryUrl =
"/api/proxy/pinswg_dnses?$filter=pinswg_name eq '" + "/api/proxy/pinswg_dnses?$filter=pinswg_name eq '" +
caseReference + caseReference +
@@ -537,9 +528,9 @@ export const getLinkedCases = (parentIncidentid) => {
export const getFormData = (token, whichForm) => { export const getFormData = (token, whichForm) => {
var queryUrl = var queryUrl =
"systemforms?$select=formid,name,formxml,type,objecttypecode&$filter=(objecttypecode%20eq%20%27pinswg_" + "systemforms?$select=formid,name,formxml,type,objecttypecode&$filter=(objecttypecode eq 'pinswg_" +
whichForm + whichForm +
"%27and%20type%20eq%202)&$count=true&$top=201"; "' and type eq 2)&$count=true&$top=201";
return axios return axios
.get(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl), azureHeaders(token)) .get(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl), azureHeaders(token))
.then((res) => res.data) .then((res) => res.data)
@@ -652,10 +643,7 @@ export const getAppealID = (
console.log("proxy url ", queryUrl); console.log("proxy url ", queryUrl);
return axios return axios
.get( .get(queryUrl + hashAPIPath(queryUrl))
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
azureHeaders(getToken())
)
.then((res) => { .then((res) => {
var appealID = res.data.value[0][primaryAttribute]; var appealID = res.data.value[0][primaryAttribute];
return appealID; return appealID;
@@ -695,14 +683,14 @@ export const createCase = (token, appealTypeId, lpaID, contactid) => {
var config = { var config = {
method: "post", method: "post",
url: queryUrl + hashAPIPath(queryUrl), url: WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
headers: { headers: {
"OData-MaxVersion": "4.0", "OData-MaxVersion": "4.0",
"OData-Version": "4.0", "OData-Version": "4.0",
"Accept": "application/json;odata.metadata=none", "Accept": "application/json;odata.metadata=none",
"Prefer": 'odata.include-annotations="*",return=representation', "Prefer": 'odata.include-annotations="*",return=representation',
"Content-Type": "application/json", "Content-Type": "application/json",
"ServiceBusAuthorization": token, "Authorization": "Bearer " + token,
}, },
data: data, data: data,
}; };
@@ -745,7 +733,6 @@ export const updateCase = async (
"Accept": "application/json;odata.metadata=none", "Accept": "application/json;odata.metadata=none",
"Prefer": 'odata.include-annotations="*",return=representation', "Prefer": 'odata.include-annotations="*",return=representation',
"Content-Type": "application/json", "Content-Type": "application/json",
"Authorization": getToken(),
}, },
data: data, data: data,
}; };
@@ -815,7 +802,6 @@ export const deleteMyRepresentations = (myRepresentationsID) => {
"Accept": "application/json;odata.metadata=none", "Accept": "application/json;odata.metadata=none",
"Prefer": 'odata.include-annotations="*",return=representation', "Prefer": 'odata.include-annotations="*",return=representation',
"Content-Type": "application/json", "Content-Type": "application/json",
"Authorization": getToken(),
}, },
}; };
// console.log(config); // console.log(config);
@@ -894,7 +880,6 @@ export const createWatchedCases = (formValues) => {
"Accept": "application/json;odata.metadata=none", "Accept": "application/json;odata.metadata=none",
"Prefer": 'odata.include-annotations="*",return=representation', "Prefer": 'odata.include-annotations="*",return=representation',
"Content-Type": "application/json", "Content-Type": "application/json",
"Authorization": getToken(),
}, },
data: data, data: data,
}; };
@@ -920,7 +905,6 @@ export const deleteWatchedCases = (watchedCaseID) => {
"Accept": "application/json;odata.metadata=none", "Accept": "application/json;odata.metadata=none",
"Prefer": 'odata.include-annotations="*",return=representation', "Prefer": 'odata.include-annotations="*",return=representation',
"Content-Type": "application/json", "Content-Type": "application/json",
"Authorization": getToken(),
}, },
}; };
// console.log(config); // console.log(config);