refactor phase 3 targeted actions imports
This commit is contained in:
@@ -13,11 +13,11 @@ import MediaDetails from "./media";
|
||||
import {
|
||||
createWatchedCases,
|
||||
deleteWatchedCases,
|
||||
getLinkedCases,
|
||||
getPortalModuleDetailsProxy,
|
||||
getWatchedCasesProxy,
|
||||
setCaseInvolvment
|
||||
} from "../../actions";
|
||||
} from "../../actions/services/portalService";
|
||||
import { getLinkedCases } from "../../actions/services/searchService";
|
||||
import { getPortalModuleDetailsProxy } from "../../actions/services/caseService";
|
||||
import {
|
||||
setCurrentLinkedCases,
|
||||
setCurrentReference,
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
* description: Failed
|
||||
*/
|
||||
|
||||
import { consoleLogger, getPreferredLanguage } from "../../../actions";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getPreferredLanguage } from "../../../actions/services/accountService";
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var data = req.body;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { getToken } from "../../../actions";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { getCaseBlob } from "../../../actions/azurestorage";
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -81,7 +81,7 @@ export default async function ApiProxy(req, res) {
|
||||
ceq: "4fddd7e8-7d26-ec11-a97f-00224800e98c", // Inspector Scheduling
|
||||
other: "8ffabad9-7c26-ec11-a97f-00224800e98c", // Casework
|
||||
postdec: "1357e457-7e26-ec11-a97f-00224800e98c", // SLT Team
|
||||
comp: "1357e457-7e26-ec11-a97f-00224800e98c", // SLT Team
|
||||
comp: "1357e457-7e26-ec11-a97f-00224800e98c" // SLT Team
|
||||
};
|
||||
|
||||
let teamId = teamMap[contactValue];
|
||||
@@ -93,7 +93,7 @@ export default async function ApiProxy(req, res) {
|
||||
"scheduledend": new Date(
|
||||
new Date().getTime() + 60 * 60000 * 24
|
||||
).toISOString(), // 30 mins
|
||||
...(teamId && { "ownerid@odata.bind": `/teams(${teamId})` }),
|
||||
...(teamId && { "ownerid@odata.bind": `/teams(${teamId})` })
|
||||
};
|
||||
|
||||
//console.log("/////Create Task:\n", payload, "\n//////////////");
|
||||
@@ -107,9 +107,9 @@ export default async function ApiProxy(req, res) {
|
||||
"Accept": "application/json",
|
||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Authorization": "Bearer " + token.access_token,
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
data: JSON.stringify(payload),
|
||||
data: JSON.stringify(payload)
|
||||
};
|
||||
|
||||
//console.log("/////Create Task config:\n", config, "\n//////////////");
|
||||
|
||||
@@ -53,10 +53,10 @@ import _ from "lodash";
|
||||
import {
|
||||
azureHeadersPagedCustom,
|
||||
azureHeadersPaged,
|
||||
azureHeaders,
|
||||
consoleLogger,
|
||||
getToken,
|
||||
} from "../../../actions";
|
||||
azureHeaders
|
||||
} from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -18,12 +18,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import {
|
||||
azureHeaders,
|
||||
consoleLogger,
|
||||
getToken,
|
||||
getPreferredLanguage,
|
||||
} from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -55,19 +52,19 @@ export default async function ApiProxy(req, res) {
|
||||
var apiResponse = _.isEmpty(req.query)
|
||||
? res.status(400).json()
|
||||
: typeof emailAddress != "undefined" && emailAddress.length > 0
|
||||
? axios
|
||||
.get(
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
azureHeaders(token.access_token)
|
||||
)
|
||||
.then(({ data }) => {
|
||||
res.status(200).json(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
res.status(400).json(error);
|
||||
})
|
||||
: res.status(400).json();
|
||||
? axios
|
||||
.get(
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
azureHeaders(token.access_token)
|
||||
)
|
||||
.then(({ data }) => {
|
||||
res.status(200).json(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
res.status(400).json(error);
|
||||
})
|
||||
: res.status(400).json();
|
||||
|
||||
return apiResponse;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user