diff --git a/src/client/src/api-lib/actions/stratigraphy.js b/src/client/src/api-lib/actions/stratigraphy.js index 7866808b4..0a9a4f7f3 100644 --- a/src/client/src/api-lib/actions/stratigraphy.js +++ b/src/client/src/api-lib/actions/stratigraphy.js @@ -59,16 +59,3 @@ export function gapLayer(id, process = 0, value = null) { value: value, }); } - -export function patchLayer(id, field, value) { - if (field === "layer_lithology_top_bedrock") { - // Fixes discrepancy between field name in client and API. - field = "lithology_top_bedrock"; - } - return fetch("/borehole/stratigraphy/layer/edit", { - action: "PATCH", - id: id, - field: field, - value: value, - }); -} diff --git a/src/client/src/api-lib/index.js b/src/client/src/api-lib/index.js index 4b5148320..b9f6c9319 100644 --- a/src/client/src/api-lib/index.js +++ b/src/client/src/api-lib/index.js @@ -81,7 +81,6 @@ import { deleteLayer, gapLayer, getLayers, - patchLayer, } from "./actions/stratigraphy"; import { @@ -165,7 +164,6 @@ export { deleteLayer, gapLayer, getLayers, - patchLayer, getProfile, getProfiles, getProfileLayers, diff --git a/src/client/src/commons/form/profile/components/profileAttributes/api/index.js b/src/client/src/commons/form/profile/components/profileAttributes/api/index.js deleted file mode 100644 index 6d7157be2..000000000 --- a/src/client/src/commons/form/profile/components/profileAttributes/api/index.js +++ /dev/null @@ -1,18 +0,0 @@ -import { patchLayer } from "../../../../../../api-lib/index"; - -let isSendAttribute = false; -export const sendAttribute = async (id, attribute, value) => { - await patchLayer(id, attribute, value) - .then(response => { - if (response.data.success) { - isSendAttribute = true; - } else { - alert(response.data.message); - window.location.reload(); - } - }) - .catch(error => { - console.error(error); - }); - return isSendAttribute; -};