From 03b3a318c081141ed60e1fe0dc6f697b6bd23f0a Mon Sep 17 00:00:00 2001 From: Manuel Bustillo Date: Sun, 27 Oct 2024 19:03:56 +0100 Subject: [PATCH] Refresh list of guests after status update --- app/ui/guests/table.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ui/guests/table.tsx b/app/ui/guests/table.tsx index 9d8cc51..1215907 100644 --- a/app/ui/guests/table.tsx +++ b/app/ui/guests/table.tsx @@ -32,13 +32,13 @@ export default function guestsTable() { fetch("/api/guests/bulk_update.json", { method: 'POST', - body: JSON.stringify({ properties: { status: "Invited" }, guest_ids: [e.currentTarget.getAttribute('data-guest-id')] }), + body: JSON.stringify({ properties: { status: "invited" }, guest_ids: [e.currentTarget.getAttribute('data-guest-id')] }), headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': getCsrfToken(), } }) - .then((response) => console.log(response.json())) + .then(() => loadGuests()) .catch((error) => console.error(error)); }