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
+5 -8
View File
@@ -82,14 +82,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
const { cookies } = req;
let token = await getToken();
token = token.access_token;
let loggedInUser = cookies.pinsUser;
let [searchResultsObj, watchedCases] = await Promise.all([
await getBasicSearch(token, query.q),
await getWatchedCases(token, loggedInUser),
await getBasicSearch(query.q),
await getWatchedCases(loggedInUser),
]);
searchResultsObj =
@@ -104,8 +101,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
//console.log("sssss", searchResultsObj);
const [searchDetailsObj, watchedCasesDetails] = await Promise.all([
await getSearchDetails(token, searchResultsObj),
await getDetails(token, watchedCases, "myWatchedCases"),
await getSearchDetails(searchResultsObj),
await getDetails(watchedCases, "myWatchedCases"),
]);
store.dispatch(setSearchResults(searchResultsObj));
@@ -116,7 +113,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
}
);
const getDetails = (token, resultsObj, detailsType) => {
const getDetails = (resultsObj, detailsType) => {
//console.log(resultsObj);
let detailsArr = [];
resultsObj = resultsObj.value;