remove unused imports
This commit is contained in:
+11
-2
@@ -1,6 +1,7 @@
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import _ from "lodash";
|
||||
import { hashAPIPath } from ".";
|
||||
import { da } from "date-fns/locale";
|
||||
const {
|
||||
ContainerClient,
|
||||
BlockBlobClient,
|
||||
@@ -143,7 +144,14 @@ export const createContainer = async (containerName) => {
|
||||
|
||||
const blobServiceClient = new BlobServiceClient(`${STORAGE_PATH}`, creds);
|
||||
|
||||
const createContainerResponse = await containerClient.createIfNotExists();
|
||||
const createContainerResponse = await containerClient
|
||||
.createIfNotExists()
|
||||
.then((data) => {
|
||||
return data;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("has error", err);
|
||||
});
|
||||
|
||||
//console.log(
|
||||
// "\n//////////////////\n container name :",
|
||||
@@ -151,7 +159,8 @@ export const createContainer = async (containerName) => {
|
||||
// "\n//////////////////\n"
|
||||
// );
|
||||
|
||||
return containerName;
|
||||
console.log(createContainerResponse);
|
||||
return createContainerResponse;
|
||||
};
|
||||
|
||||
export const getContainers = async () => {
|
||||
|
||||
+6
-10
@@ -42,9 +42,13 @@ export const consoleLogger = (err) => {
|
||||
var errStr =
|
||||
"\n\n/////////////////////////////////////////////////\nServer Error " +
|
||||
"\n" +
|
||||
(_.has(err, "response.status")
|
||||
? "Status: " + err.response.status + "\n"
|
||||
(_.has(err, "name") ? "Name: " + err.name + "\n" : "") +
|
||||
(_.has(err, "code") ? "Code: " + err.code + "\n" : "") +
|
||||
(_.has(err, "message") ? "Message: " + err.message + "\n" : "") +
|
||||
(_.has(err, "request.url")
|
||||
? "request.url: " + err.request.url + "\n"
|
||||
: "") +
|
||||
(_.has(err, "response.status") ? "Status: " + err.code + "\n" : "") +
|
||||
(_.has(err, "response.statusText")
|
||||
? "\nStatusText: " + err.response.status + "\n"
|
||||
: "") +
|
||||
@@ -96,7 +100,6 @@ export const getToken = () => {
|
||||
return data;
|
||||
})
|
||||
.catch((error) => {
|
||||
//console.log("error :", error.response);
|
||||
consoleLogger(error);
|
||||
return error;
|
||||
});
|
||||
@@ -283,7 +286,6 @@ export const getAddressSearchPaged = (
|
||||
fieldSort,
|
||||
showNumberOfRecords
|
||||
) => {
|
||||
//console.log(queryUrl);
|
||||
return axios
|
||||
.get(
|
||||
"/api/endpoint/getbasicsearch_by_address_paged_api?searchString=" +
|
||||
@@ -312,7 +314,6 @@ export const getBasicSearchPaged = (
|
||||
fieldSort,
|
||||
showNumberOfRecords
|
||||
) => {
|
||||
//console.log(queryUrl);
|
||||
return axios
|
||||
.get(
|
||||
"/api/endpoint/getbasicsearchpaged_api?searchString=" +
|
||||
@@ -338,7 +339,6 @@ export const getDNSCoords = () => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getdnscoords_api")
|
||||
.then((res) => {
|
||||
//console.log(res.data);
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -581,7 +581,6 @@ export const getLinkedCases = (parentIncidentid) => {
|
||||
parentIncidentid
|
||||
)
|
||||
.then((res) => {
|
||||
//console.log(" linked date", res.data);
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -626,7 +625,6 @@ export const getLPA = () => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getlpa_api")
|
||||
.then((res) => {
|
||||
//console.log(res.data);
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -681,7 +679,6 @@ export const getPersonalAccount = (contactid) => {
|
||||
contactid
|
||||
)
|
||||
.then((res) => {
|
||||
//console.log(res.data);
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -1284,7 +1281,6 @@ export const getCase = (incidentID) => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getcase_api?incidentID=" + incidentID)
|
||||
.then((res) => {
|
||||
//console.log("//////////----", res.data);
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
@@ -50,10 +50,6 @@ export const getSelectQuery = (appealTypeName) => {
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_sitepostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_starttimeofevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_planningappeals78s":
|
||||
//console.log(
|
||||
// "///////////////\n path:",
|
||||
// process.env.RELAYPATH == "test-pedw-hc"
|
||||
// );
|
||||
return process.env.RELAYPATH == "dev-pedw-hc"
|
||||
? "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_representation_period_end_date,pinswg_extend_representation_date,pinswg_typeofevent"
|
||||
: "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_typeofevent";
|
||||
|
||||
Reference in New Issue
Block a user