From 67c0a5e9b2936dc26d4e01cdb14cae2049d27910 Mon Sep 17 00:00:00 2001 From: Tim Aldinger Date: Fri, 9 Oct 2026 23:07:01 +0200 Subject: [PATCH] =?UTF-8?q?fetch-call=20f=C3=BCr=20patch=20list=20im[oleme?= =?UTF-8?q?ntier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/js/pages/index/api/indexAPI.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; +}