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:
@@ -33,6 +33,11 @@
|
||||
tags: newStudySpaceData.tags
|
||||
})
|
||||
.eq("id", newStudySpaceData.id ?? "");
|
||||
await supabase.channel("study_space_updates").send({
|
||||
type: "broadcast",
|
||||
event: "study_space_updated",
|
||||
payload: { id: newStudySpaceData.id }
|
||||
});
|
||||
invalidate("db:study_spaces");
|
||||
if (feedbackUpload) return alert(`Error submitting feedback: ${feedbackUpload.message}`);
|
||||
else alert("Feedback submitted successfully!");
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
.select()
|
||||
.single();
|
||||
|
||||
await supabase.channel("report_updates").send({
|
||||
type: "broadcast",
|
||||
event: "reports_updated",
|
||||
payload: { study_space_id: studySpaceId }
|
||||
});
|
||||
|
||||
if (reportUploadError)
|
||||
return alert(`Error submitting report: ${reportUploadError.message}`);
|
||||
else alert("Report submitted successfully!");
|
||||
|
||||
Reference in New Issue
Block a user