feat: realtime updates for study spaces and reports

This commit is contained in:
2025-06-16 17:08:11 +01:00
parent 7332c0376b
commit 9399a653a3
5 changed files with 39 additions and 1 deletions

View File

@@ -207,6 +207,13 @@
.insert(genTimings(studySpaceInsert.id));
if (hoursErr) return alert(`Error saving opening times: ${hoursErr.message}`);
}
await supabase.channel("study_space_updates").send({
type: "broadcast",
event: "study_space_updated",
payload: {
study_space_id: studySpaceInsert.id
}
});
alert("Thank you for your contribution!");
// Redirect to the new study space page
await goto(`/space/${studySpaceInsert.id}`, {