remove references to token

This commit is contained in:
2022-01-13 13:54:06 +00:00
parent af13552717
commit bef5e8abcc
52 changed files with 393 additions and 381 deletions
+9 -12
View File
@@ -167,9 +167,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
// console.log("the cookoies", cookies);
let token = await getToken();
token = token.access_token;
let loggedInUser = cookies.pinsUser;
let providerConfig = await getProviderConfig();
@@ -191,11 +188,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
watchedCases,
awaitingSubmission,
] = await Promise.all([
await getPersonalAccount(token, loggedInUser),
await getMyCases(token, loggedInUser),
await getMyRepresentations(token, loggedInUser),
await getWatchedCases(token, loggedInUser),
await getAwaitingSubmission(token),
await getPersonalAccount(loggedInUser),
await getMyCases(loggedInUser),
await getMyRepresentations(loggedInUser),
await getWatchedCases(loggedInUser),
await getAwaitingSubmission(),
]);
//const cookiesMaker = nookies.get(ctx)
@@ -219,9 +216,9 @@ export const getServerSideProps = wrapper.getServerSideProps(
watchedCasesDetails,
// awaitingSubmissionDetails,
] = await Promise.all([
await getDetails(token, myCases, "myCases"),
await getDetails(token, myRepresentations, "myRepresentations"),
await getDetails(token, watchedCases, "myWatchedCases"),
await getDetails(myCases, "myCases"),
await getDetails(myRepresentations, "myRepresentations"),
await getDetails(watchedCases, "myWatchedCases"),
//await getDetails(awaitingSubmission),
]);
@@ -243,7 +240,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
}
);
const getDetails = (token, resultsObj, detailsType) => {
const getDetails = (resultsObj, detailsType) => {
console.log(detailsType);
let detailsArr = [];
resultsObj = resultsObj.value;