diff --git a/components/myportal/viewall.js b/components/myportal/viewall.js index 3299fe46..1885c7ea 100644 --- a/components/myportal/viewall.js +++ b/components/myportal/viewall.js @@ -9,13 +9,16 @@ import { connect } from "react-redux"; import { deleteAwaitingSubmissionsFromBlob, deleteMyRepresentationsFromBlob, - deleteWatchedCases, getAwaitingSubmissionFromBlobProxy, - getRepsFromBlobProxy, - getWatchedCasesProxy, + getRepsFromBlobProxy +} from "../../actions/services/documentService"; +import { + createWatchedCases, + deleteWatchedCases, getWatchedCases, - createWatchedCases -} from "../../actions"; + getWatchedCasesProxy +} from "../../actions/services/portalService"; +import { consoleLogger } from "../../actions/core/logger"; import { getDetailsProxy, getFormCollectionByID } from "../../components/utils"; import transLookup from "../../data/lookuptranslations.json"; import { setAwaitingSubmissionFromBlob } from "../../store/awaitingSubmission/action"; diff --git a/components/search/addresssearchresults.js b/components/search/addresssearchresults.js index 5e7c1327..bf3b05bb 100644 --- a/components/search/addresssearchresults.js +++ b/components/search/addresssearchresults.js @@ -28,7 +28,7 @@ import { createWatchedCases, deleteWatchedCases, getWatchedCasesProxy -} from "../../actions"; +} from "../../actions/services/portalService"; import RepsOnResults from "./repsonresults"; const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); diff --git a/pages/unsubscribe/[watchlistid].js b/pages/unsubscribe/[watchlistid].js index 490331de..dc6c5f43 100644 --- a/pages/unsubscribe/[watchlistid].js +++ b/pages/unsubscribe/[watchlistid].js @@ -6,12 +6,10 @@ import Link from "next/link"; import CookieBanner from "../../components/cookieBanner"; import Footer from "../../components/footer"; import Header from "../../components/header"; -import { - hashAPIPath, - getToken, - azureHeaders, - consoleLogger, -} from "../../actions"; +import { hashAPIPath } from "../../actions/core/hash"; +import { getToken } from "../../actions/core/token"; +import { azureHeaders } from "../../actions/core/headers"; +import { consoleLogger } from "../../actions/core/logger"; import axios from "axios"; const UnsubscribeCase = (props) => { @@ -97,8 +95,8 @@ const deleteWatchedCases = async (watchedCaseID) => { "Accept": "application/json", "Prefer": 'odata.include-annotations="*",return=representation', "Authorization": "Bearer " + token.access_token, - "Content-Type": "application/json", - }, + "Content-Type": "application/json" + } }; return axios(config) @@ -143,8 +141,8 @@ export const getServerSideProps = wrapper.getServerSideProps( ? caseObj[ "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue" ] - : null, - }, + : null + } }; } ); diff --git a/pages/unsubscribeall/[watchlistid].js b/pages/unsubscribeall/[watchlistid].js index e5b7f505..6f67aa83 100644 --- a/pages/unsubscribeall/[watchlistid].js +++ b/pages/unsubscribeall/[watchlistid].js @@ -6,12 +6,10 @@ import Link from "next/link"; import CookieBanner from "../../components/cookieBanner"; import Footer from "../../components/footer"; import Header from "../../components/header"; -import { - hashAPIPath, - getToken, - azureHeaders, - consoleLogger, -} from "../../actions"; +import { hashAPIPath } from "../../actions/core/hash"; +import { getToken } from "../../actions/core/token"; +import { azureHeaders } from "../../actions/core/headers"; +import { consoleLogger } from "../../actions/core/logger"; import axios from "axios"; const UnsubscribeCase = (props) => { @@ -118,8 +116,8 @@ const deleteWatchedCases = async (watchedCaseID) => { "Accept": "application/json", "Prefer": 'odata.include-annotations="*",return=representation', "Authorization": "Bearer " + token.access_token, - "Content-Type": "application/json", - }, + "Content-Type": "application/json" + } }; return axios(config) @@ -170,8 +168,8 @@ export const getServerSideProps = wrapper.getServerSideProps( //console.log(deleteCase); return { props: { - caseRef: hasUnsubscribed ? searchResultsObj.value : null, - }, + caseRef: hasUnsubscribed ? searchResultsObj.value : null + } }; } );