diff --git a/actions/govgateway.js b/actions/govgateway.js index 74acc198..59f35458 100644 --- a/actions/govgateway.js +++ b/actions/govgateway.js @@ -47,21 +47,6 @@ export const getUserInfo = (userInfoURL, authToken) => { }); }; -export const getPortalLogin = (emailAddress, token) => { - var queryUrl = - "contacts?$filter=emailaddress1 eq '" + - emailAddress + - "'&$count=true&$select=emailaddress1,contactid,pinswg_custom_password,yomifullname,firstname,lastname"; - return axios - .get(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl), azureHeaders(token)) - .then((res) => res.data) - .catch((error) => { - console.log(consoleLogger(error)); - //console.log("thiserror", error); - return JSON.stringify(error); - }); -}; - var Base64 = { _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", diff --git a/actions/index.js b/actions/index.js index 74bb1ba7..47689368 100644 --- a/actions/index.js +++ b/actions/index.js @@ -761,7 +761,8 @@ export const getAwaitingSubmission = (loggedInUserId) => { export const getAwaitingSubmissionFromBlob = (containerName) => { console.log( "///////////////////////\ngetAwaitingSubmissionFromBlob: " + - containerName + containerName + + "\n///////////////////////\n" ); return axios .get( @@ -1400,3 +1401,17 @@ export const getNotice = () => { console.log("this serror", error); }); }; + +export const getPortalLogin = (emailAddress) => { + var queryUrl = + "/api/endpoint/getportallogin_api?emailAddress=" + emailAddress; + + return axios + .get(BASE_URL + queryUrl) + .then((res) => res.data) + .catch((error) => { + //console.log(consoleLogger(error)); + console.log("thiserror", error); + return JSON.stringify(error); + }); +};