diff --git a/src/main/resources/static/js/pages/index/api/indexAPI.js b/src/main/resources/static/js/pages/index/api/indexAPI.js index f02b2d2..32966f9 100644 --- a/src/main/resources/static/js/pages/index/api/indexAPI.js +++ b/src/main/resources/static/js/pages/index/api/indexAPI.js @@ -19,3 +19,15 @@ export async function deleteList(id) { return response; } + + +export async function editList(listID, toChange) { + const response = await fetch(`/api/list/${listID}`, + { + method: "PATCH", + body: JSON.stringify(toChange), + headers: { "Content-Type": "application/json" } + }); + + return response; +}