moved function to actions

This commit is contained in:
2022-10-18 11:52:14 +01:00
parent 8c5b299412
commit 748ecec313
2 changed files with 16 additions and 16 deletions
-15
View File
@@ -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+/=",
+16 -1
View File
@@ -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);
});
};