fix: NewRemoteReview param struct, atomic review+orphan movie delete

This commit is contained in:
2026-10-26 01:19:09 +01:00
parent 9a4d0c1714
commit 7f9c252d35
18 changed files with 261 additions and 116 deletions

View File

@@ -60,6 +60,15 @@ impl MovieCommand for InMemoryStore {
"Database operation failed".into(),
));
}
self.remove_movie_with_cascades(id);
self.record_events(events);
Ok(())
}
}
impl InMemoryStore {
/// Removes the movie row and applies the schema's cascades.
pub(super) fn remove_movie_with_cascades(&self, id: uuid::Uuid) {
self.movies.write().unwrap().remove(&id);
self.watchlist
.write()
@@ -72,9 +81,6 @@ impl MovieCommand for InMemoryStore {
*event = detached_from_movie(event);
}
}
drop(events_guard);
self.record_events(events);
Ok(())
}
}