fetch-call für patch list im[olementier
This commit is contained in:
1 parent
e8319d304a
commit
67c0a5e9b2
1 file changed
+12
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user