diff --git a/src/main/resources/static/js/shared/sharedAPI.js b/src/main/resources/static/js/shared/sharedAPI.js new file mode 100644 index 0000000..eb5a750 --- /dev/null +++ b/src/main/resources/static/js/shared/sharedAPI.js @@ -0,0 +1,8 @@ +export async function editElement(apiPath, toChange) { + return await fetch(apiPath, + { + method: "PATCH", + body: JSON.stringify(toChange), + headers: { "Content-Type": "application/json" } + }); +}