Restructure the update payload

This commit is contained in:
Manuel Bustillo 2024-10-27 11:58:48 +01:00
parent 7ea96ea7ad
commit ae7b338771

View File

@ -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));
}