From ae7b338771b9be9bac9ea3c62232cbed398da82a Mon Sep 17 00:00:00 2001 From: Manuel Bustillo Date: Sun, 27 Oct 2024 11:58:48 +0100 Subject: [PATCH] Restructure the update payload --- app/ui/guests/table.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ui/guests/table.tsx b/app/ui/guests/table.tsx index 56b6291..9205a65 100644 --- a/app/ui/guests/table.tsx +++ b/app/ui/guests/table.tsx @@ -28,7 +28,7 @@ export default function guestsTable() { function handleInviteGuest() { - fetch("http://localhost:3001/guests/123.json", { method: 'PATCH', body: JSON.stringify({ guest: { status: 'Invited' } }) }) + fetch("http://localhost:3001/guests/bulk-status-change.json", { method: 'POST', body: JSON.stringify({ status: "Invited", guest_ids: [] }) }) .then((response) => console.log(response.json())) .catch((error) => console.error(error)); }