pre prod fixes

This commit is contained in:
2024-07-04 11:29:35 +01:00
parent 8b2dc95e84
commit 07de9705e4
6 changed files with 35 additions and 9 deletions
+6 -3
View File
@@ -38,8 +38,11 @@ export const getServerSideProps = async (ctx) => {
);
console.log(
"\n\n\n=================================================\n",
"Environment name:" + accountName,
"\n=================================================",
"\nEnvironment name: " + accountName,
"\nStorage account path: " +
`https://${accountName}.blob.core.windows.net`,
"\n creds: " + JSON.stringify(creds),
"\n=================================================\n"
);
@@ -48,7 +51,7 @@ export const getServerSideProps = async (ctx) => {
async function checkDB() {
const allUsers = await prisma.user.findMany();
console.log(
"\n\n\n=================================================\n",
"\n=================================================\n",
"Show users in Auth DB:\n",
allUsers,
"\n=================================================\n"
+6
View File
@@ -146,6 +146,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
}
const accountDetails = await getPersonalAccount(loggedInUser);
const lpaid =
accountDetails[
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
];
store.dispatch(setContainerID(thisSession.user.id));
store.dispatch(setAccountDetails(accountDetails));
store.dispatch(setLoggedInUserId(loggedInUser));
+4 -2
View File
@@ -5,7 +5,7 @@ import { useEffect } from "react";
import { getSession, useSession } from "next-auth/react";
import { useRouter } from "next/router";
import { connect, useDispatch } from "react-redux";
import { getPersonalAccount, getPortalLogin } from "../../actions";
import { getPersonalAccount, getPortalLoginProxy } from "../../actions";
import Breadcrumbs from "../../components/breadcrumbs";
import CookieBanner from "../../components/cookieBanner";
import Footer from "../../components/footer";
@@ -34,7 +34,9 @@ const RepresentationF = (props) => {
const thisSession = await getSession();
if (thisSession) {
let loggedInUser = await getPortalLogin(thisSession.user.email);
let loggedInUser = await getPortalLoginProxy(
thisSession.user.email
);
dispatch(
setAccountDetails(
await getPersonalAccount(