Merge branch 'realtime' into 'master'

feat: realtime updates for study spaces and reports

See merge request gk1623/drp-48!29

Co-authored-by: Gleb Koval <gleb@koval.net>
This commit is contained in:
Ling, Alex
2025-06-16 20:29:27 +00:00
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}`, {