a
This commit is contained in:
@@ -170,6 +170,13 @@ export const remove = mutation({
|
||||
)
|
||||
.collect();
|
||||
for (const analysis of analyses) {
|
||||
const sections = await ctx.db
|
||||
.query("analysisSections")
|
||||
.withIndex("by_analysis", (q) => q.eq("analysisId", analysis._id))
|
||||
.collect();
|
||||
for (const section of sections) {
|
||||
await ctx.db.delete(section._id);
|
||||
}
|
||||
await ctx.db.delete(analysis._id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user