Skip to content

Commit

Permalink
Clean up legacy api (#1414)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschumpr authored Jul 30, 2024
2 parents 77ac380 + d181c86 commit 17b2b06
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 76 deletions.
14 changes: 0 additions & 14 deletions src/client/src/api-lib/actions/borehole.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -102,13 +95,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",
Expand Down
37 changes: 0 additions & 37 deletions src/client/src/api-lib/actions/identifier.js
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
7 changes: 0 additions & 7 deletions src/client/src/api-lib/actions/stratigraphy.js
Original file line number Diff line number Diff line change
@@ -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", {
Expand Down
20 changes: 2 additions & 18 deletions src/client/src/api-lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {
} from "./actions/workgroups";

import {
getBorehole,
updateBorehole,
loadBorehole,
loadBoreholes,
Expand All @@ -35,22 +34,14 @@ import {
createBorehole,
lockBorehole,
unlockBorehole,
editBorehole,
deleteBorehole,
deleteBoreholes,
patchBorehole,
patchBoreholes,
getGeojson,
} from "./actions/borehole";

import {
listIdentifier,
createIdentifier,
deleteIdentifier,
updateIdentifier,
addIdentifier,
removeIdentifier,
} from "./actions/identifier";
import { addIdentifier, removeIdentifier } from "./actions/identifier";

import {
loadWorkflows,
Expand All @@ -61,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";

Expand Down Expand Up @@ -95,7 +86,6 @@ export {
listWorkgroups,
setRole,
updateWorkgroup,
getBorehole,
loadBorehole,
updateBorehole,
loadBoreholes,
Expand All @@ -104,16 +94,11 @@ export {
createBorehole,
lockBorehole,
unlockBorehole,
editBorehole,
deleteBorehole,
deleteBoreholes,
patchBorehole,
patchBoreholes,
getGeojson,
listIdentifier,
createIdentifier,
deleteIdentifier,
updateIdentifier,
addIdentifier,
removeIdentifier,
loadWorkflows,
Expand All @@ -125,7 +110,6 @@ export {
createLayer,
deleteLayer,
gapLayer,
getLayers,
getProfileLayers,
loadDomains,
patchCodeConfig,
Expand Down

0 comments on commit 17b2b06

Please sign in to comment.