From da925fbb703f003bb2a57436880f7e6681813606 Mon Sep 17 00:00:00 2001 From: tschumpr Date: Tue, 30 Jul 2024 15:39:37 +0200 Subject: [PATCH 1/4] Delete duplicate function --- src/client/src/api-lib/actions/borehole.js | 7 ------- src/client/src/api-lib/index.js | 2 -- 2 files changed, 9 deletions(-) diff --git a/src/client/src/api-lib/actions/borehole.js b/src/client/src/api-lib/actions/borehole.js index dbf2c4af4..232978de5 100644 --- a/src/client/src/api-lib/actions/borehole.js +++ b/src/client/src/api-lib/actions/borehole.js @@ -102,13 +102,6 @@ export function deleteBoreholes(ids) { }); } -export function getBorehole(id) { - return fetch("/borehole", { - action: "GET", - id: id, - }); -} - export function loadBorehole(id) { return fetch("/borehole", { type: "GET", diff --git a/src/client/src/api-lib/index.js b/src/client/src/api-lib/index.js index ad436da21..8effb802e 100644 --- a/src/client/src/api-lib/index.js +++ b/src/client/src/api-lib/index.js @@ -26,7 +26,6 @@ import { } from "./actions/workgroups"; import { - getBorehole, updateBorehole, loadBorehole, loadBoreholes, @@ -95,7 +94,6 @@ export { listWorkgroups, setRole, updateWorkgroup, - getBorehole, loadBorehole, updateBorehole, loadBoreholes, From 560df083c31a5e1a20c06dfe2cbd69eab4fc7d2f Mon Sep 17 00:00:00 2001 From: tschumpr Date: Tue, 30 Jul 2024 16:14:00 +0200 Subject: [PATCH 2/4] Delete unused function --- src/client/src/api-lib/actions/borehole.js | 7 ------- src/client/src/api-lib/index.js | 2 -- 2 files changed, 9 deletions(-) diff --git a/src/client/src/api-lib/actions/borehole.js b/src/client/src/api-lib/actions/borehole.js index 232978de5..d44307b78 100644 --- a/src/client/src/api-lib/actions/borehole.js +++ b/src/client/src/api-lib/actions/borehole.js @@ -64,13 +64,6 @@ export function unlockBorehole(id) { }); } -export function editBorehole(id) { - return fetch("/borehole/edit", { - type: "EDIT", - id: id, // project id - }); -} - export function patchBorehole(id, field, value) { return fetch("/borehole/edit", { action: "PATCH", diff --git a/src/client/src/api-lib/index.js b/src/client/src/api-lib/index.js index 8effb802e..171d6d504 100644 --- a/src/client/src/api-lib/index.js +++ b/src/client/src/api-lib/index.js @@ -34,7 +34,6 @@ import { createBorehole, lockBorehole, unlockBorehole, - editBorehole, deleteBorehole, deleteBoreholes, patchBorehole, @@ -102,7 +101,6 @@ export { createBorehole, lockBorehole, unlockBorehole, - editBorehole, deleteBorehole, deleteBoreholes, patchBorehole, From 9b72c034a2edee5fd662d30be2bd629880ee4dc6 Mon Sep 17 00:00:00 2001 From: tschumpr Date: Tue, 30 Jul 2024 16:41:18 +0200 Subject: [PATCH 3/4] Delete unused functions --- src/client/src/api-lib/actions/identifier.js | 37 ------------------- .../src/api-lib/actions/stratigraphy.js | 7 ---- src/client/src/api-lib/index.js | 15 +------- 3 files changed, 2 insertions(+), 57 deletions(-) diff --git a/src/client/src/api-lib/actions/identifier.js b/src/client/src/api-lib/actions/identifier.js index 607bb6ab4..cc659f570 100644 --- a/src/client/src/api-lib/actions/identifier.js +++ b/src/client/src/api-lib/actions/identifier.js @@ -1,42 +1,5 @@ import { fetch } from "./index"; -export function listIdentifier() { - return fetch("/borehole/identifier", { - type: "LIST", - }); -} - -/* -identifiers example: -{ - de: "föö", - en: "foo", - fr: "foo", - it: "bar", -} -*/ -export function createIdentifier(identifiers) { - return fetch("/borehole/identifier/admin", { - action: "CREATE", - text: identifiers, - }); -} - -export function deleteIdentifier(id) { - return fetch("/borehole/identifier/admin", { - action: "DELETE", - id: id, - }); -} - -export function updateIdentifier(id, identifiers) { - return fetch("/borehole/identifier/admin", { - action: "UPDATE", - id: id, - text: identifiers, - }); -} - export function addIdentifier(borehole_id, identifier, value) { return fetch("/borehole/identifier/edit", { action: "ADD", diff --git a/src/client/src/api-lib/actions/stratigraphy.js b/src/client/src/api-lib/actions/stratigraphy.js index 514527425..a0c8502ee 100644 --- a/src/client/src/api-lib/actions/stratigraphy.js +++ b/src/client/src/api-lib/actions/stratigraphy.js @@ -1,12 +1,5 @@ import { fetch } from "./index"; -export function getLayers(id) { - return fetch("/borehole/stratigraphy/layer", { - action: "LIST", - id: id, // stratigrafy id - }); -} - // Create a new layer for the given stratigraphy id export function createLayer(id) { return fetch("/borehole/stratigraphy/layer/edit", { diff --git a/src/client/src/api-lib/index.js b/src/client/src/api-lib/index.js index 171d6d504..ccdcdfeb3 100644 --- a/src/client/src/api-lib/index.js +++ b/src/client/src/api-lib/index.js @@ -41,14 +41,7 @@ import { getGeojson, } from "./actions/borehole"; -import { - listIdentifier, - createIdentifier, - deleteIdentifier, - updateIdentifier, - addIdentifier, - removeIdentifier, -} from "./actions/identifier"; +import { addIdentifier, removeIdentifier } from "./actions/identifier"; import { loadWorkflows, @@ -59,7 +52,7 @@ import { resetWorkflow, } from "./actions/workflow"; -import { createLayer, deleteLayer, gapLayer, getLayers } from "./actions/stratigraphy"; +import { createLayer, deleteLayer, gapLayer } from "./actions/stratigraphy"; import { getProfileLayers } from "./actions/profile"; @@ -106,10 +99,6 @@ export { patchBorehole, patchBoreholes, getGeojson, - listIdentifier, - createIdentifier, - deleteIdentifier, - updateIdentifier, addIdentifier, removeIdentifier, loadWorkflows, From d181c86d11c004107e30ea665f97849544ebcad5 Mon Sep 17 00:00:00 2001 From: tschumpr Date: Tue, 30 Jul 2024 16:55:08 +0200 Subject: [PATCH 4/4] Remove unused code --- src/client/src/api-lib/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/client/src/api-lib/index.js b/src/client/src/api-lib/index.js index ccdcdfeb3..ca7baac8d 100644 --- a/src/client/src/api-lib/index.js +++ b/src/client/src/api-lib/index.js @@ -110,7 +110,6 @@ export { createLayer, deleteLayer, gapLayer, - getLayers, getProfileLayers, loadDomains, patchCodeConfig,