moved hashapipath to reusable single helper
This commit is contained in:
@@ -7,7 +7,7 @@ import { getUpToLastSlash, streamToString } from "../utils/adminHelper";
|
|||||||
import { listContainersForUser } from "../../../actions/azurestorage";
|
import { listContainersForUser } from "../../../actions/azurestorage";
|
||||||
|
|
||||||
const prisma = global.prisma || new PrismaClient();
|
const prisma = global.prisma || new PrismaClient();
|
||||||
|
const WORDKEY = process.env.HASHKEY;
|
||||||
/**
|
/**
|
||||||
* Generate HMAC hash for blob API link.
|
* Generate HMAC hash for blob API link.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,26 +21,13 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
|
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { number } from "prop-types";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const WORDKEY = process.env.HASHKEY;
|
const WORDKEY = process.env.HASHKEY;
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
const encryptDocReference = (documentRef) => {
|
const encryptDocReference = (documentRef) => {
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
var hashlink = CryptoJS.HmacSHA256(
|
||||||
"documents/download/" + documentRef,
|
"documents/download/" + documentRef,
|
||||||
|
|||||||
@@ -21,25 +21,12 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
|
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var searchString = req.query.searchString;
|
var searchString = req.query.searchString;
|
||||||
var pageNumber = req.query.pageNumber || 1;
|
var pageNumber = req.query.pageNumber || 1;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { azureHeaders, azureHeadersPaged } from "../../../actions/core/headers";
|
|||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { formatDates } from "../../../components/utils";
|
import { formatDates } from "../../../components/utils";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
var NotifyClient = require("notifications-node-client").NotifyClient;
|
var NotifyClient = require("notifications-node-client").NotifyClient;
|
||||||
|
|
||||||
@@ -15,14 +16,6 @@ const WEBAPI_URL =
|
|||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
const hash = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
).toString(CryptoJS.enc.Hex);
|
|
||||||
return queryPath.includes("?") ? `&hash=${hash}` : `?hash=${hash}`;
|
|
||||||
};
|
|
||||||
|
|
||||||
const encryptDocReference = (documentRef) => {
|
const encryptDocReference = (documentRef) => {
|
||||||
const hash = CryptoJS.HmacSHA256(
|
const hash = CryptoJS.HmacSHA256(
|
||||||
`documents/download/${documentRef}`,
|
`documents/download/${documentRef}`,
|
||||||
|
|||||||
@@ -4,25 +4,12 @@ import _ from "lodash";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
function flattenWatchlistEntry(entry) {
|
function flattenWatchlistEntry(entry) {
|
||||||
const flattened = { ...entry };
|
const flattened = { ...entry };
|
||||||
|
|
||||||
|
|||||||
@@ -4,23 +4,13 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const WORDKEY = process.env.HASHKEY;
|
const WORDKEY = process.env.HASHKEY;
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
/**
|
|
||||||
* Generates a hash-secured query string.
|
|
||||||
*/
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
const hash = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
).toString(CryptoJS.enc.Hex);
|
|
||||||
return queryPath.includes("?") ? `&hash=${hash}` : `?hash=${hash}`;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encrypts a document reference into a secure hash link.
|
* Encrypts a document reference into a secure hash link.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,24 +4,13 @@ import _ from "lodash";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const WORDKEY = process.env.HASHKEY;
|
const WORDKEY = process.env.HASHKEY;
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate hashed query string for secured API access.
|
|
||||||
*/
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
const hash = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
).toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
return queryPath.includes("?") ? `&hash=${hash}` : `?hash=${hash}`;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main proxy handler.
|
* Main proxy handler.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import _ from "lodash";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const WORDKEY = process.env.HASHKEY;
|
const WORDKEY = process.env.HASHKEY;
|
||||||
|
|
||||||
@@ -11,18 +12,6 @@ const WEBAPI_URL =
|
|||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
function flattenWatchlistEntry(entry) {
|
function flattenWatchlistEntry(entry) {
|
||||||
const flattened = { ...entry };
|
const flattened = { ...entry };
|
||||||
|
|
||||||
|
|||||||
@@ -14,25 +14,12 @@ import axios from "axios";
|
|||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
var queryUrl = "contacts";
|
var queryUrl = "contacts";
|
||||||
|
|||||||
@@ -46,24 +46,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { getCaseBlob } from "../../../actions/azurestorage";
|
import { getCaseBlob } from "../../../actions/azurestorage";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var createCaseBody = req.body;
|
var createCaseBody = req.body;
|
||||||
var contactid = req.query.contactid;
|
var contactid = req.query.contactid;
|
||||||
|
|||||||
@@ -48,24 +48,12 @@ import { isNonEmptyString, sanitizeString } from "../../../actions/core/guards";
|
|||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { getCaseBlob } from "../../../actions/azurestorage";
|
import { getCaseBlob } from "../../../actions/azurestorage";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var createTaskBody = req.body;
|
var createTaskBody = req.body;
|
||||||
|
|
||||||
|
|||||||
@@ -14,25 +14,12 @@ import axios from "axios";
|
|||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
// export default async function ApiProxy(req, res) {
|
// export default async function ApiProxy(req, res) {
|
||||||
// var token = await getToken();
|
// var token = await getToken();
|
||||||
// var data = JSON.stringify(req.body);
|
// var data = JSON.stringify(req.body);
|
||||||
|
|||||||
@@ -14,25 +14,12 @@ import axios from "axios";
|
|||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var incidentID = req.query.incidentID;
|
var incidentID = req.query.incidentID;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -15,24 +15,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
|
||||||
const WORDKEY = process.env.HASHKEY;
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var myRepresentationsID = req.query.myRepresentationsID;
|
var myRepresentationsID = req.query.myRepresentationsID;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -14,25 +14,12 @@ import axios from "axios";
|
|||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var watchedCaseID = req.query.watchedCaseID;
|
var watchedCaseID = req.query.watchedCaseID;
|
||||||
|
|
||||||
|
|||||||
@@ -21,22 +21,12 @@ import _ from "lodash";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var emailAddress = req.query.emailAddress;
|
var emailAddress = req.query.emailAddress;
|
||||||
|
|
||||||
|
|||||||
@@ -27,25 +27,12 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var searchString = req.query.searchstring;
|
var searchString = req.query.searchstring;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -57,25 +57,12 @@ import {
|
|||||||
} from "../../../actions/core/headers";
|
} from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var searchString = req.query.searchstring;
|
var searchString = req.query.searchstring;
|
||||||
var pageNumber = req.query.pageNumber;
|
var pageNumber = req.query.pageNumber;
|
||||||
|
|||||||
@@ -33,22 +33,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var caseReference = req.query.caseReference;
|
var caseReference = req.query.caseReference;
|
||||||
var updateFormCollection = req.query.updateFormCollection;
|
var updateFormCollection = req.query.updateFormCollection;
|
||||||
|
|||||||
@@ -21,25 +21,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
const groupArray = (arr) => {
|
const groupArray = (arr) => {
|
||||||
const map = new Map();
|
const map = new Map();
|
||||||
|
|
||||||
|
|||||||
@@ -14,25 +14,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|
||||||
|
|||||||
@@ -22,22 +22,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var loggedInUserId = req.query.loggedInUserId;
|
var loggedInUserId = req.query.loggedInUserId;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -15,22 +15,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var loggedInUserId = req.query.loggedInUserId;
|
var loggedInUserId = req.query.loggedInUserId;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -22,25 +22,12 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|
||||||
|
|||||||
@@ -16,25 +16,12 @@ import _ from "lodash";
|
|||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var caseReference = req.query.caseReference;
|
var caseReference = req.query.caseReference;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -16,25 +16,12 @@ import { azureHeadersPaged } from "../../../actions/core/headers";
|
|||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var caseReference = req.query.caseReference;
|
var caseReference = req.query.caseReference;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -22,25 +22,12 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var searchString = req.query.searchString;
|
var searchString = req.query.searchString;
|
||||||
|
|
||||||
|
|||||||
@@ -2,22 +2,12 @@ import axios from "axios";
|
|||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import { azureHeadersNoOdata } from "../../../actions/core/headers";
|
import { azureHeadersNoOdata } from "../../../actions/core/headers";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var appealTypeName = req.query.appealTypeName;
|
var appealTypeName = req.query.appealTypeName;
|
||||||
var primaryIdAttribute = req.query.primaryIdAttribute;
|
var primaryIdAttribute = req.query.primaryIdAttribute;
|
||||||
|
|||||||
@@ -21,25 +21,12 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var searchString = req.query.searchString;
|
var searchString = req.query.searchString;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -21,25 +21,12 @@ import { JSONPath as jsonpath } from "jsonpath-plus";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
const getIncident = async (incidentID) => {
|
const getIncident = async (incidentID) => {
|
||||||
const queryUrl =
|
const queryUrl =
|
||||||
process.env.API_ROOT +
|
process.env.API_ROOT +
|
||||||
@@ -48,7 +35,7 @@ const getIncident = async (incidentID) => {
|
|||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
method: "get",
|
method: "get",
|
||||||
url: queryUrl,
|
url: queryUrl
|
||||||
};
|
};
|
||||||
|
|
||||||
return axios(config)
|
return axios(config)
|
||||||
@@ -84,7 +71,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "0735866b-5482-eb11-aac0-00224800be9c",
|
"MetadataId": "0735866b-5482-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040018",
|
"appealTypeID": "846040018",
|
||||||
"NavigationProperty": "pinswg_AdvertsIds",
|
"NavigationProperty": "pinswg_AdvertsIds",
|
||||||
"value": "Adverts",
|
"value": "Adverts"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_callinss77s",
|
"LogicalCollectionName": "pinswg_callinss77s",
|
||||||
@@ -94,7 +81,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "dd309e51-4982-eb11-aac0-00224800be9c",
|
"MetadataId": "dd309e51-4982-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040010",
|
"appealTypeID": "846040010",
|
||||||
"NavigationProperty": "pinswg_CallInsS77Ids",
|
"NavigationProperty": "pinswg_CallInsS77Ids",
|
||||||
"value": "Called In Applications - S77",
|
"value": "Called In Applications - S77"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_commonlands",
|
"LogicalCollectionName": "pinswg_commonlands",
|
||||||
@@ -104,7 +91,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "4161a618-5082-eb11-aac0-00224800be9c",
|
"MetadataId": "4161a618-5082-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040016",
|
"appealTypeID": "846040016",
|
||||||
"NavigationProperty": "pinswg_CommonLandIds",
|
"NavigationProperty": "pinswg_CommonLandIds",
|
||||||
"value": "Common Land",
|
"value": "Common Land"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName":
|
"LogicalCollectionName":
|
||||||
@@ -115,7 +102,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "0c309f3c-4882-eb11-aac0-00224800be9c",
|
"MetadataId": "0c309f3c-4882-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040009",
|
"appealTypeID": "846040009",
|
||||||
"NavigationProperty": "pinswg_CommunityInfrastructureLevyIds",
|
"NavigationProperty": "pinswg_CommunityInfrastructureLevyIds",
|
||||||
"value": "Community Infrastructure Levy - S117, 118, & 119",
|
"value": "Community Infrastructure Levy - S117, 118, & 119"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_compulsorypurchaseorderses",
|
"LogicalCollectionName": "pinswg_compulsorypurchaseorderses",
|
||||||
@@ -125,7 +112,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "054da4c7-5582-eb11-aac0-00224800be9c",
|
"MetadataId": "054da4c7-5582-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040019",
|
"appealTypeID": "846040019",
|
||||||
"NavigationProperty": "pinswg_CompulsoryPurchaseOrdersIds",
|
"NavigationProperty": "pinswg_CompulsoryPurchaseOrdersIds",
|
||||||
"value": "Compulsory Purchase Orders",
|
"value": "Compulsory Purchase Orders"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_dnses",
|
"LogicalCollectionName": "pinswg_dnses",
|
||||||
@@ -135,7 +122,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "36f07225-4a82-eb11-aac0-00224800be9c",
|
"MetadataId": "36f07225-4a82-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040011",
|
"appealTypeID": "846040011",
|
||||||
"NavigationProperty": "pinswg_DNSIds",
|
"NavigationProperty": "pinswg_DNSIds",
|
||||||
"value": "Developments of National Significance",
|
"value": "Developments of National Significance"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_electricityacts",
|
"LogicalCollectionName": "pinswg_electricityacts",
|
||||||
@@ -145,7 +132,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "6aedaab1-4a82-eb11-aac0-00224800be9c",
|
"MetadataId": "6aedaab1-4a82-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040012",
|
"appealTypeID": "846040012",
|
||||||
"NavigationProperty": "pinswg_ElectricityActIds",
|
"NavigationProperty": "pinswg_ElectricityActIds",
|
||||||
"value": "Electricity Act",
|
"value": "Electricity Act"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName":
|
"LogicalCollectionName":
|
||||||
@@ -157,8 +144,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040006",
|
"appealTypeID": "846040006",
|
||||||
"NavigationProperty": "pinswg_EnforcementListedBuildingConseIds",
|
"NavigationProperty": "pinswg_EnforcementListedBuildingConseIds",
|
||||||
"value":
|
"value": "Enforcement Listed Building and Conservation Appeal - S39"
|
||||||
"Enforcement Listed Building and Conservation Appeal - S39",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_enforcementnoticeappeals174s",
|
"LogicalCollectionName": "pinswg_enforcementnoticeappeals174s",
|
||||||
@@ -168,7 +154,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "930a3cc4-9181-eb11-aac0-00224800be9c",
|
"MetadataId": "930a3cc4-9181-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040005",
|
"appealTypeID": "846040005",
|
||||||
"NavigationProperty": "pinswg_EnforcementNoticeAppealS174Ids",
|
"NavigationProperty": "pinswg_EnforcementNoticeAppealS174Ids",
|
||||||
"value": "Enforcement Notice Appeal - S174",
|
"value": "Enforcement Notice Appeal - S174"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_environmentalpermittings",
|
"LogicalCollectionName": "pinswg_environmentalpermittings",
|
||||||
@@ -178,7 +164,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "62d4aa9a-5682-eb11-aac0-00224800be9c",
|
"MetadataId": "62d4aa9a-5682-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040020",
|
"appealTypeID": "846040020",
|
||||||
"NavigationProperty": "pinswg_EnforcementPermittingIds",
|
"NavigationProperty": "pinswg_EnforcementPermittingIds",
|
||||||
"value": "Environmental Permitting",
|
"value": "Environmental Permitting"
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// "LogicalCollectionName": "pinswg_harbourrevisionorders",
|
// "LogicalCollectionName": "pinswg_harbourrevisionorders",
|
||||||
@@ -200,7 +186,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"appealTypeID": "846040017",
|
"appealTypeID": "846040017",
|
||||||
"NavigationProperty": "pinswg_HedgesHedgerowsTreePreservatioIds",
|
"NavigationProperty": "pinswg_HedgesHedgerowsTreePreservatioIds",
|
||||||
"value":
|
"value":
|
||||||
"High Hedges, Tree Preservation orders, Hedgerows, Tree Replacement Notice.",
|
"High Hedges, Tree Preservation orders, Hedgerows, Tree Replacement Notice."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_householderappealhases",
|
"LogicalCollectionName": "pinswg_householderappealhases",
|
||||||
@@ -210,7 +196,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "a6c728b0-9081-eb11-aac0-00224800be9c",
|
"MetadataId": "a6c728b0-9081-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040004",
|
"appealTypeID": "846040004",
|
||||||
"NavigationProperty": "pinswg_HouseholderAppealHASIds",
|
"NavigationProperty": "pinswg_HouseholderAppealHASIds",
|
||||||
"value": "Householder and Minor Commercial Appeals - HAS/CAS",
|
"value": "Householder and Minor Commercial Appeals - HAS/CAS"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates",
|
"LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates",
|
||||||
@@ -220,7 +206,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "184e4861-9681-eb11-aac0-00224800be9c",
|
"MetadataId": "184e4861-9681-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040008",
|
"appealTypeID": "846040008",
|
||||||
"NavigationProperty": "pinswg_LawfulDevelopmentCertificatAppIds",
|
"NavigationProperty": "pinswg_LawfulDevelopmentCertificatAppIds",
|
||||||
"value": "Lawful Development Certificate Appeal - S194 + 195",
|
"value": "Lawful Development Certificate Appeal - S194 + 195"
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// "LogicalCollectionName": "pinswg_ldps",
|
// "LogicalCollectionName": "pinswg_ldps",
|
||||||
@@ -249,7 +235,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "bb302784-9581-eb11-aac0-00224800be9c",
|
"MetadataId": "bb302784-9581-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040007",
|
"appealTypeID": "846040007",
|
||||||
"NavigationProperty": "pinswg_MaintenanceofLandS217Ids",
|
"NavigationProperty": "pinswg_MaintenanceofLandS217Ids",
|
||||||
"value": "Maintenance of Land - S217",
|
"value": "Maintenance of Land - S217"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_miscellaneouscaseworks",
|
"LogicalCollectionName": "pinswg_miscellaneouscaseworks",
|
||||||
@@ -258,7 +244,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"UrlName": "miscellaneouscasework",
|
"UrlName": "miscellaneouscasework",
|
||||||
"MetadataId": "f519aa8e-5782-eb11-aac0-00224800be9c",
|
"MetadataId": "f519aa8e-5782-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040022",
|
"appealTypeID": "846040022",
|
||||||
"NavigationProperty": "pinswg_MiscellaneousCasewordIds",
|
"NavigationProperty": "pinswg_MiscellaneousCasewordIds"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_nonvalidations",
|
"LogicalCollectionName": "pinswg_nonvalidations",
|
||||||
@@ -268,7 +254,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "37f31a93-5882-eb11-aac0-00224800be9c",
|
"MetadataId": "37f31a93-5882-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040024",
|
"appealTypeID": "846040024",
|
||||||
"NavigationProperty": "pinswg_NonValidationIds",
|
"NavigationProperty": "pinswg_NonValidationIds",
|
||||||
"value": "Non-Validation",
|
"value": "Non-Validation"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_planningappeals78s",
|
"LogicalCollectionName": "pinswg_planningappeals78s",
|
||||||
@@ -278,7 +264,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "8d7f813a-4183-eb11-aac0-00224800be9c",
|
"MetadataId": "8d7f813a-4183-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040000",
|
"appealTypeID": "846040000",
|
||||||
"NavigationProperty": "pinswg_PlanningAppealS78Ids",
|
"NavigationProperty": "pinswg_PlanningAppealS78Ids",
|
||||||
"value": "Planning Appeal - S78",
|
"value": "Planning Appeal - S78"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_planningconditionss73s79s",
|
"LogicalCollectionName": "pinswg_planningconditionss73s79s",
|
||||||
@@ -288,7 +274,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "093bf9ff-8d81-eb11-aac0-00224800be9c",
|
"MetadataId": "093bf9ff-8d81-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040001",
|
"appealTypeID": "846040001",
|
||||||
"NavigationProperty": "pinswg_PlanningConditionsS73S79Ids",
|
"NavigationProperty": "pinswg_PlanningConditionsS73S79Ids",
|
||||||
"value": "Planning Conditions - S73 + S79",
|
"value": "Planning Conditions - S73 + S79"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_planningobligationappeals106s",
|
"LogicalCollectionName": "pinswg_planningobligationappeals106s",
|
||||||
@@ -298,7 +284,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "cb8beeae-8f81-eb11-aac0-00224800be9c",
|
"MetadataId": "cb8beeae-8f81-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040003",
|
"appealTypeID": "846040003",
|
||||||
"NavigationProperty": "pinswg_PlanningObligationAppealS106Ids",
|
"NavigationProperty": "pinswg_PlanningObligationAppealS106Ids",
|
||||||
"value": "Planning Obligation Appeal - S106",
|
"value": "Planning Obligation Appeal - S106"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_sipses",
|
"LogicalCollectionName": "pinswg_sipses",
|
||||||
@@ -309,7 +295,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"appealTypeID": "846040002",
|
"appealTypeID": "846040002",
|
||||||
"tmpNav": "pinswg_sipsid",
|
"tmpNav": "pinswg_sipsid",
|
||||||
"NavigationProperty": "pinswg_sipscase",
|
"NavigationProperty": "pinswg_sipscase",
|
||||||
"value": "SIP",
|
"value": "SIP"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -320,7 +306,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "4ccc6e93-4f82-eb11-aac0-00224800be9c",
|
"MetadataId": "4ccc6e93-4f82-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040015",
|
"appealTypeID": "846040015",
|
||||||
"NavigationProperty": "pinswg_ROWIds",
|
"NavigationProperty": "pinswg_ROWIds",
|
||||||
"value": "Rights of Way",
|
"value": "Rights of Way"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_transportandworkacts",
|
"LogicalCollectionName": "pinswg_transportandworkacts",
|
||||||
@@ -330,7 +316,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "bc3edc4b-7d82-eb11-aac0-00224800be9c",
|
"MetadataId": "bc3edc4b-7d82-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040013",
|
"appealTypeID": "846040013",
|
||||||
"NavigationProperty": "pinswg_TransportandWorkActIds",
|
"NavigationProperty": "pinswg_TransportandWorkActIds",
|
||||||
"value": "Transport and Works Act",
|
"value": "Transport and Works Act"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_wayleaves",
|
"LogicalCollectionName": "pinswg_wayleaves",
|
||||||
@@ -340,8 +326,8 @@ export default async function ApiProxy(req, res) {
|
|||||||
"MetadataId": "a0652117-5782-eb11-aac0-00224800be9c",
|
"MetadataId": "a0652117-5782-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040021",
|
"appealTypeID": "846040021",
|
||||||
"NavigationProperty": "pinswg_WayleaveIds",
|
"NavigationProperty": "pinswg_WayleaveIds",
|
||||||
"value": "Wayleave",
|
"value": "Wayleave"
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const getSearchResultsObj = await Promise.all(
|
const getSearchResultsObj = await Promise.all(
|
||||||
@@ -403,7 +389,8 @@ export default async function ApiProxy(req, res) {
|
|||||||
"pinswg_electricityacts" ||
|
"pinswg_electricityacts" ||
|
||||||
item.LogicalCollectionName ==
|
item.LogicalCollectionName ==
|
||||||
"pinswg_dnses" ||
|
"pinswg_dnses" ||
|
||||||
item.LogicalCollectionName == "pinswg_sipses"
|
item.LogicalCollectionName ==
|
||||||
|
"pinswg_sipses"
|
||||||
? "pinswg_addresstown"
|
? "pinswg_addresstown"
|
||||||
: "pinswg_siteaddresstown") +
|
: "pinswg_siteaddresstown") +
|
||||||
", '" +
|
", '" +
|
||||||
@@ -425,7 +412,8 @@ export default async function ApiProxy(req, res) {
|
|||||||
"pinswg_electricityacts" ||
|
"pinswg_electricityacts" ||
|
||||||
item.LogicalCollectionName ==
|
item.LogicalCollectionName ==
|
||||||
"pinswg_dnses" ||
|
"pinswg_dnses" ||
|
||||||
item.LogicalCollectionName == "pinswg_sipses"
|
item.LogicalCollectionName ==
|
||||||
|
"pinswg_sipses"
|
||||||
? "pinswg_addresscounty"
|
? "pinswg_addresscounty"
|
||||||
: item.LogicalCollectionName == "pinswg_rows"
|
: item.LogicalCollectionName == "pinswg_rows"
|
||||||
? "pinswg_sitecounty"
|
? "pinswg_sitecounty"
|
||||||
@@ -615,7 +603,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
: "_" +
|
: "_" +
|
||||||
item.NavigationProperty.toLowerCase() +
|
item.NavigationProperty.toLowerCase() +
|
||||||
"_value"
|
"_value"
|
||||||
],
|
]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return searchResultsObj.push(data);
|
return searchResultsObj.push(data);
|
||||||
@@ -632,7 +620,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
searchResultsObj = jsonpath({
|
searchResultsObj = jsonpath({
|
||||||
path: "$..[?(@ && @.pinswg_name)]",
|
path: "$..[?(@ && @.pinswg_name)]",
|
||||||
json: searchResultsObj,
|
json: searchResultsObj,
|
||||||
eval: true,
|
eval: true
|
||||||
});
|
});
|
||||||
|
|
||||||
searchResultsObj = searchResultsObj.filter((arr) => arr.incidentid != null);
|
searchResultsObj = searchResultsObj.filter((arr) => arr.incidentid != null);
|
||||||
@@ -663,7 +651,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
Object.assign(key, {
|
Object.assign(key, {
|
||||||
"pinswg_publishtoweb": incidentObj.pinswg_publishtoweb,
|
"pinswg_publishtoweb": incidentObj.pinswg_publishtoweb,
|
||||||
"ticketnumber": incidentObj.ticketnumber,
|
"ticketnumber": incidentObj.ticketnumber,
|
||||||
"pinswg_lpareference": incidentObj.pinswg_lpareference,
|
"pinswg_lpareference": incidentObj.pinswg_lpareference
|
||||||
});
|
});
|
||||||
|
|
||||||
return incidentObj;
|
return incidentObj;
|
||||||
@@ -695,7 +683,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
let searchResultsOutputObj = {};
|
let searchResultsOutputObj = {};
|
||||||
Object.assign(searchResultsOutputObj, {
|
Object.assign(searchResultsOutputObj, {
|
||||||
"@odata.count": searchResultsObj.length,
|
"@odata.count": searchResultsObj.length,
|
||||||
"value": searchResultsObj,
|
"value": searchResultsObj
|
||||||
});
|
});
|
||||||
|
|
||||||
return res.status(200).json(searchResultsOutputObj);
|
return res.status(200).json(searchResultsOutputObj);
|
||||||
|
|||||||
@@ -3,22 +3,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
let hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
// ✅ IMPORTANT: Only include the 23 types that actually contain pinswg_lpaapplicationreference
|
// ✅ IMPORTANT: Only include the 23 types that actually contain pinswg_lpaapplicationreference
|
||||||
// You can copy from your existing appealTypeArray but only keep those entities.
|
// You can copy from your existing appealTypeArray but only keep those entities.
|
||||||
|
|
||||||
@@ -31,7 +21,7 @@ var appealTypeArrayWithLpaRef = [
|
|||||||
"MetadataId": "0735866b-5482-eb11-aac0-00224800be9c",
|
"MetadataId": "0735866b-5482-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040018",
|
"appealTypeID": "846040018",
|
||||||
"NavigationProperty": "pinswg_AdvertsIds",
|
"NavigationProperty": "pinswg_AdvertsIds",
|
||||||
"value": "Adverts",
|
"value": "Adverts"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_callinss77s",
|
"LogicalCollectionName": "pinswg_callinss77s",
|
||||||
@@ -41,7 +31,7 @@ var appealTypeArrayWithLpaRef = [
|
|||||||
"MetadataId": "dd309e51-4982-eb11-aac0-00224800be9c",
|
"MetadataId": "dd309e51-4982-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040010",
|
"appealTypeID": "846040010",
|
||||||
"NavigationProperty": "pinswg_CallInsS77Ids",
|
"NavigationProperty": "pinswg_CallInsS77Ids",
|
||||||
"value": "Called In Applications - S77",
|
"value": "Called In Applications - S77"
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// "LogicalCollectionName": "pinswg_commonlands",
|
// "LogicalCollectionName": "pinswg_commonlands",
|
||||||
@@ -156,7 +146,7 @@ var appealTypeArrayWithLpaRef = [
|
|||||||
"MetadataId": "a6c728b0-9081-eb11-aac0-00224800be9c",
|
"MetadataId": "a6c728b0-9081-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040004",
|
"appealTypeID": "846040004",
|
||||||
"NavigationProperty": "pinswg_HouseholderAppealHASIds",
|
"NavigationProperty": "pinswg_HouseholderAppealHASIds",
|
||||||
"value": "Householder and Minor Commercial Appeals - HAS/CAS",
|
"value": "Householder and Minor Commercial Appeals - HAS/CAS"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates",
|
"LogicalCollectionName": "pinswg_lawfuldevelopmentcertificates",
|
||||||
@@ -166,7 +156,7 @@ var appealTypeArrayWithLpaRef = [
|
|||||||
"MetadataId": "184e4861-9681-eb11-aac0-00224800be9c",
|
"MetadataId": "184e4861-9681-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040008",
|
"appealTypeID": "846040008",
|
||||||
"NavigationProperty": "pinswg_LawfulDevelopmentCertificatAppIds",
|
"NavigationProperty": "pinswg_LawfulDevelopmentCertificatAppIds",
|
||||||
"value": "Lawful Development Certificate Appeal - S194 + 195",
|
"value": "Lawful Development Certificate Appeal - S194 + 195"
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// "LogicalCollectionName": "pinswg_ldps",
|
// "LogicalCollectionName": "pinswg_ldps",
|
||||||
@@ -224,7 +214,7 @@ var appealTypeArrayWithLpaRef = [
|
|||||||
"MetadataId": "8d7f813a-4183-eb11-aac0-00224800be9c",
|
"MetadataId": "8d7f813a-4183-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040000",
|
"appealTypeID": "846040000",
|
||||||
"NavigationProperty": "pinswg_PlanningAppealS78Ids",
|
"NavigationProperty": "pinswg_PlanningAppealS78Ids",
|
||||||
"value": "Planning Appeal - S78",
|
"value": "Planning Appeal - S78"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_planningconditionss73s79s",
|
"LogicalCollectionName": "pinswg_planningconditionss73s79s",
|
||||||
@@ -234,8 +224,8 @@ var appealTypeArrayWithLpaRef = [
|
|||||||
"MetadataId": "093bf9ff-8d81-eb11-aac0-00224800be9c",
|
"MetadataId": "093bf9ff-8d81-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040001",
|
"appealTypeID": "846040001",
|
||||||
"NavigationProperty": "pinswg_PlanningConditionsS73S79Ids",
|
"NavigationProperty": "pinswg_PlanningConditionsS73S79Ids",
|
||||||
"value": "Planning Conditions - S73 + S79",
|
"value": "Planning Conditions - S73 + S79"
|
||||||
},
|
}
|
||||||
// {
|
// {
|
||||||
// "LogicalCollectionName": "pinswg_planningobligationappeals106s",
|
// "LogicalCollectionName": "pinswg_planningobligationappeals106s",
|
||||||
// "LogicalName": "pinswg_planningobligationappeals106",
|
// "LogicalName": "pinswg_planningobligationappeals106",
|
||||||
@@ -321,7 +311,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"statuscode",
|
"statuscode",
|
||||||
"pinswg_lpaapplicationreference",
|
"pinswg_lpaapplicationreference",
|
||||||
"pinswg_name",
|
"pinswg_name",
|
||||||
"_" + item.NavigationProperty.toLowerCase() + "_value", // for incidentid mapping (same pattern you used)
|
"_" + item.NavigationProperty.toLowerCase() + "_value" // for incidentid mapping (same pattern you used)
|
||||||
].join(",");
|
].join(",");
|
||||||
|
|
||||||
const filter = `contains(pinswg_lpaapplicationreference,'${lowered}')`;
|
const filter = `contains(pinswg_lpaapplicationreference,'${lowered}')`;
|
||||||
@@ -360,7 +350,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"_" +
|
"_" +
|
||||||
item.NavigationProperty.toLowerCase() +
|
item.NavigationProperty.toLowerCase() +
|
||||||
"_value"
|
"_value"
|
||||||
] || null,
|
] || null
|
||||||
}));
|
}));
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
@@ -379,7 +369,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
|
|
||||||
const output = {
|
const output = {
|
||||||
"@odata.count": flattened.length,
|
"@odata.count": flattened.length,
|
||||||
value: flattened,
|
value: flattened
|
||||||
};
|
};
|
||||||
|
|
||||||
return res.status(200).json(output);
|
return res.status(200).json(output);
|
||||||
|
|||||||
@@ -36,21 +36,12 @@ import { consoleLogger } from "../../../actions/core/logger";
|
|||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||||
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
|
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var appealTypeName = req.query.appealTypeName;
|
var appealTypeName = req.query.appealTypeName;
|
||||||
var primaryIdAttribute = req.query.primaryIdAttribute;
|
var primaryIdAttribute = req.query.primaryIdAttribute;
|
||||||
@@ -104,7 +95,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
let flattened = data.value.map((r) => ({
|
let flattened = data.value.map((r) => ({
|
||||||
...r,
|
...r,
|
||||||
ticketnumber: r[navigationProperty]?.ticketnumber || null,
|
ticketnumber: r[navigationProperty]?.ticketnumber || null
|
||||||
}));
|
}));
|
||||||
|
|
||||||
data.value = flattened;
|
data.value = flattened;
|
||||||
|
|||||||
@@ -37,24 +37,12 @@ import { consoleLogger } from "../../../actions/core/logger";
|
|||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||||
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
|
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var appealTypeName = req.query.appealTypeName;
|
var appealTypeName = req.query.appealTypeName;
|
||||||
var primaryIdAttribute = req.query.primaryIdAttribute;
|
var primaryIdAttribute = req.query.primaryIdAttribute;
|
||||||
|
|||||||
@@ -16,25 +16,12 @@ import _ from "lodash";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var incidentID = req.query.incidentID;
|
var incidentID = req.query.incidentID;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -16,25 +16,12 @@ import _ from "lodash";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var incidentID = req.query.incidentID;
|
var incidentID = req.query.incidentID;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -21,25 +21,12 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var searchString = req.query.id;
|
var searchString = req.query.id;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -4,25 +4,12 @@ import { azureHeaders } from "../../../actions/core/headers";
|
|||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import OSPoint from "ospoint";
|
import OSPoint from "ospoint";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
const renameKeys = (obj) => {
|
const renameKeys = (obj) => {
|
||||||
const keyMappings = {
|
const keyMappings = {
|
||||||
"pinswg_projectlocation": "location",
|
"pinswg_projectlocation": "location",
|
||||||
@@ -41,7 +28,7 @@ const renameKeys = (obj) => {
|
|||||||
"appellantDisplayName",
|
"appellantDisplayName",
|
||||||
"_pinswg_appellant_value": "appellantId",
|
"_pinswg_appellant_value": "appellantId",
|
||||||
"zoom": "mapZoom",
|
"zoom": "mapZoom",
|
||||||
"center": "locationCenter",
|
"center": "locationCenter"
|
||||||
};
|
};
|
||||||
|
|
||||||
let renamedObj = {};
|
let renamedObj = {};
|
||||||
@@ -63,7 +50,7 @@ const renameKeys = (obj) => {
|
|||||||
if (obj.center) {
|
if (obj.center) {
|
||||||
renamedObj.locationCenter = {
|
renamedObj.locationCenter = {
|
||||||
lat: obj.center.lat,
|
lat: obj.center.lat,
|
||||||
lng: obj.center.lng,
|
lng: obj.center.lng
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +70,7 @@ const keysToRemove = [
|
|||||||
"_pinswg_associatedlpa_value@Microsoft.Dynamics.CRM.lookuplogicalname",
|
"_pinswg_associatedlpa_value@Microsoft.Dynamics.CRM.lookuplogicalname",
|
||||||
"_pinswg_appellant_value@Microsoft.Dynamics.CRM.lookuplogicalname",
|
"_pinswg_appellant_value@Microsoft.Dynamics.CRM.lookuplogicalname",
|
||||||
"pinswg_anticipatedgridrefeasting@OData.Community.Display.V1.FormattedValue",
|
"pinswg_anticipatedgridrefeasting@OData.Community.Display.V1.FormattedValue",
|
||||||
"pinswg_anticipatedgridrefnorthing@OData.Community.Display.V1.FormattedValue",
|
"pinswg_anticipatedgridrefnorthing@OData.Community.Display.V1.FormattedValue"
|
||||||
// Add any other keys to remove here
|
// Add any other keys to remove here
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -151,7 +138,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
: parseFloat(siteCoords.latitude),
|
: parseFloat(siteCoords.latitude),
|
||||||
lng: isNaN(parseFloat(siteCoords.longitude))
|
lng: isNaN(parseFloat(siteCoords.longitude))
|
||||||
? -3.437989
|
? -3.437989
|
||||||
: parseFloat(siteCoords.longitude),
|
: parseFloat(siteCoords.longitude)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -159,7 +146,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
|
|
||||||
const updatedData = {
|
const updatedData = {
|
||||||
value: coordsObj.value.map((item) => renameKeys(item)),
|
value: coordsObj.value.map((item) => renameKeys(item)),
|
||||||
"@odata.count": coordsObj["@odata.count"],
|
"@odata.count": coordsObj["@odata.count"]
|
||||||
};
|
};
|
||||||
|
|
||||||
return req.query.hasOwnProperty("fordmw")
|
return req.query.hasOwnProperty("fordmw")
|
||||||
|
|||||||
@@ -4,25 +4,12 @@ import _ from "lodash";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|
||||||
|
|||||||
@@ -21,22 +21,12 @@ import _ from "lodash";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var emailAddress = req.query.emailAddress;
|
var emailAddress = req.query.emailAddress;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -3,25 +3,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var whichForm = req.query.whichForm;
|
var whichForm = req.query.whichForm;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -21,25 +21,12 @@ import _ from "lodash";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var searchString = req.query.searchString;
|
var searchString = req.query.searchString;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
@@ -61,13 +48,13 @@ export default async function ApiProxy(req, res) {
|
|||||||
)
|
)
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
//console.log(
|
//console.log(
|
||||||
"\n==========================================\n",
|
("\n==========================================\n",
|
||||||
// "basic search incident: " + queryUrl,
|
// "basic search incident: " + queryUrl,
|
||||||
// "\n\n",
|
// "\n\n",
|
||||||
// "data: " + JSON.stringify(data),
|
// "data: " + JSON.stringify(data),
|
||||||
// "\n\n",
|
// "\n\n",
|
||||||
"publihs:" + JSON.stringify(data.value[0]),
|
"publihs:" + JSON.stringify(data.value[0]),
|
||||||
"\n==========================================\n";
|
"\n==========================================\n");
|
||||||
//);
|
//);
|
||||||
return res.status(200).json(data);
|
return res.status(200).json(data);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -20,25 +20,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var searchString = req.query.searchString;
|
var searchString = req.query.searchString;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -21,25 +21,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var parentIncidentid = req.query.parentincidentid;
|
var parentIncidentid = req.query.parentincidentid;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -27,22 +27,12 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var emailAddress = req.query.emailAddress;
|
var emailAddress = req.query.emailAddress;
|
||||||
var pwd = req.query.pwd;
|
var pwd = req.query.pwd;
|
||||||
|
|||||||
@@ -17,25 +17,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|
||||||
|
|||||||
@@ -22,22 +22,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var loggedInUserId = req.query.loggedInUserId;
|
var loggedInUserId = req.query.loggedInUserId;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -22,22 +22,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var loggedInUserId = req.query.loggedInUserId;
|
var loggedInUserId = req.query.loggedInUserId;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -22,22 +22,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var loggedInUserId = req.query.loggedInUserId;
|
var loggedInUserId = req.query.loggedInUserId;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -4,25 +4,12 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var searchString = req.query.searchString;
|
var searchString = req.query.searchString;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -22,22 +22,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var contactid = req.query.contactid;
|
var contactid = req.query.contactid;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -21,22 +21,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var emailAddress = req.query.emailAddress;
|
var emailAddress = req.query.emailAddress;
|
||||||
var checkHash = req.query.hash;
|
var checkHash = req.query.hash;
|
||||||
|
|||||||
@@ -22,22 +22,12 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var emailAddress = req.query.emailAddress;
|
var emailAddress = req.query.emailAddress;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -29,22 +29,12 @@ import { azureHeaders } from "../../../actions/core/headers";
|
|||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var appealType = req.query.appealType;
|
var appealType = req.query.appealType;
|
||||||
var caseReference = req.query.caseReference.split("'").join("''");
|
var caseReference = req.query.caseReference.split("'").join("''");
|
||||||
|
|||||||
@@ -29,22 +29,12 @@ import { azureHeaders } from "../../../actions/core/headers";
|
|||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var appealType = req.query.appealType;
|
var appealType = req.query.appealType;
|
||||||
var caseReference = req.query.caseReference;
|
var caseReference = req.query.caseReference;
|
||||||
|
|||||||
@@ -26,22 +26,12 @@ import {
|
|||||||
} from "../../../actions/core/guards";
|
} from "../../../actions/core/guards";
|
||||||
import { consoleLogger, redactSensitive } from "../../../actions/core/logger";
|
import { consoleLogger, redactSensitive } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var emailAddress = sanitizeString(req.query.emailAddress);
|
var emailAddress = sanitizeString(req.query.emailAddress);
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -14,25 +14,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|
||||||
|
|||||||
@@ -22,22 +22,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var loggedInUserId = req.query.loggedInUserId;
|
var loggedInUserId = req.query.loggedInUserId;
|
||||||
var incidentID = req.query.incidentID;
|
var incidentID = req.query.incidentID;
|
||||||
|
|||||||
@@ -22,22 +22,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var incidentID = req.query.incidentID;
|
var incidentID = req.query.incidentID;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -21,25 +21,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
const groupArray = (arr) => {
|
const groupArray = (arr) => {
|
||||||
const map = new Map();
|
const map = new Map();
|
||||||
|
|
||||||
@@ -60,7 +47,7 @@ const groupArray = (arr) => {
|
|||||||
obj[
|
obj[
|
||||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||||
], // Change 'name' to 'userName'
|
], // Change 'name' to 'userName'
|
||||||
count: count, // Add 'count' as 'occurrences'
|
count: count // Add 'count' as 'occurrences'
|
||||||
};
|
};
|
||||||
|
|
||||||
result.push(transformedObj);
|
result.push(transformedObj);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import _ from "lodash";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const WORDKEY = process.env.HASHKEY;
|
const WORDKEY = process.env.HASHKEY;
|
||||||
|
|
||||||
@@ -29,18 +30,6 @@ const WEBAPI_URL =
|
|||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
const encryptDocReference = (documentRef) => {
|
const encryptDocReference = (documentRef) => {
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
var hashlink = CryptoJS.HmacSHA256(
|
||||||
"documents/download/" + documentRef,
|
"documents/download/" + documentRef,
|
||||||
@@ -76,7 +65,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"pinswg_documentpublisheddate":
|
"pinswg_documentpublisheddate":
|
||||||
element.pinswg_documentpublisheddate != null
|
element.pinswg_documentpublisheddate != null
|
||||||
? element.pinswg_documentpublisheddate
|
? element.pinswg_documentpublisheddate
|
||||||
: element.pinswg_latestpublisheddate,
|
: element.pinswg_latestpublisheddate
|
||||||
});
|
});
|
||||||
element.pinswg_hashlink = encryptDocReference(
|
element.pinswg_hashlink = encryptDocReference(
|
||||||
element.pinswg_isharedocumentreference
|
element.pinswg_isharedocumentreference
|
||||||
|
|||||||
@@ -21,25 +21,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var documentID = req.query.documentid;
|
var documentID = req.query.documentid;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -47,25 +47,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var documentID = req.query.documentid;
|
var documentID = req.query.documentid;
|
||||||
var pageNumber = req.query.pageNumber;
|
var pageNumber = req.query.pageNumber;
|
||||||
|
|||||||
@@ -3,25 +3,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var caseid = req.query.caseid;
|
var caseid = req.query.caseid;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -3,25 +3,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
// export default async function ApiProxy(req, res) {
|
// export default async function ApiProxy(req, res) {
|
||||||
// var caseid = req.query.caseid;
|
// var caseid = req.query.caseid;
|
||||||
// var token = await getToken();
|
// var token = await getToken();
|
||||||
|
|||||||
@@ -22,22 +22,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var loggedInUserId = req.query.loggedInUserId;
|
var loggedInUserId = req.query.loggedInUserId;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -22,22 +22,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import { azureHeaders } from "../../../actions/core/headers";
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
const BASE_URL = process.env.API_ROOT || `http://localhost:${port}`;
|
const BASE_URL = process.env.API_ROOT || `http://localhost:${port}`;
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
|
|||||||
@@ -15,25 +15,12 @@ import CryptoJS from "crypto-js";
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var incidentID = req.query.incidentid;
|
var incidentID = req.query.incidentid;
|
||||||
var queryUrl = "incidents(" + incidentID + ")";
|
var queryUrl = "incidents(" + incidentID + ")";
|
||||||
|
|||||||
@@ -14,25 +14,12 @@ import axios from "axios";
|
|||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var contactId = req.query.contactId;
|
var contactId = req.query.contactId;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -13,25 +13,12 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var data = JSON.stringify(req.body);
|
var data = JSON.stringify(req.body);
|
||||||
var appealObj = req.query.appealObj;
|
var appealObj = req.query.appealObj;
|
||||||
|
|||||||
@@ -14,25 +14,12 @@ import axios from "axios";
|
|||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var contactId = req.query.contactId;
|
var contactId = req.query.contactId;
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|||||||
@@ -7,25 +7,12 @@ import { getToken } from "../../../actions/core/token";
|
|||||||
import { getCaseBlob, createBlob } from "../../../actions/azurestorage";
|
import { getCaseBlob, createBlob } from "../../../actions/azurestorage";
|
||||||
import { getTempCaseRef } from "../../../components/utils";
|
import { getTempCaseRef } from "../../../components/utils";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var createCaseBody = req.body;
|
var createCaseBody = req.body;
|
||||||
var contactid = req.query.contactid;
|
var contactid = req.query.contactid;
|
||||||
|
|||||||
@@ -14,25 +14,12 @@ import axios from "axios";
|
|||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
if (
|
if (
|
||||||
!req.body ||
|
!req.body ||
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import nextConnect from "next-connect";
|
|||||||
import { hashAPIPath } from "../../../actions/core/hash";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
import middleware from "../middleware/middleware";
|
import middleware from "../middleware/middleware";
|
||||||
|
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const ApiProxy = nextConnect();
|
const ApiProxy = nextConnect();
|
||||||
|
|
||||||
ApiProxy.use(middleware);
|
ApiProxy.use(middleware);
|
||||||
|
|||||||
@@ -2,25 +2,12 @@ import axios from "axios";
|
|||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import { consoleLogger } from "../../../actions/core/logger";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { getToken } from "../../../actions/core/token";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
|
||||||
|
|
||||||
const WEBAPI_URL =
|
const WEBAPI_URL =
|
||||||
process.env.RELAY_ROOT ||
|
process.env.RELAY_ROOT ||
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||||
|
|
||||||
const hashAPIPath = (queryPath) => {
|
|
||||||
var hashlink = CryptoJS.HmacSHA256(
|
|
||||||
queryPath,
|
|
||||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
|
||||||
);
|
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
|
||||||
|
|
||||||
//return "&hash=" + hashlink;
|
|
||||||
|
|
||||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var data = JSON.stringify(req.body);
|
var data = JSON.stringify(req.body);
|
||||||
var appealObj = req.query.appealObj;
|
var appealObj = req.query.appealObj;
|
||||||
|
|||||||
Reference in New Issue
Block a user