feat: add watchlist entry events and update NATS subject mapping

This commit is contained in:
2026-05-13 01:55:12 +02:00
parent 10fcc27339
commit 7d4c1454f0
2 changed files with 67 additions and 8 deletions

View File

@@ -10,9 +10,8 @@ pub fn event_to_subject(prefix: &str, event: &DomainEvent) -> String {
DomainEvent::UserUpdated { .. } => "user.updated",
DomainEvent::MovieEnrichmentRequested { .. } => "movie.enrichment.requested",
DomainEvent::ImageStored { .. } => "image.stored",
DomainEvent::WatchlistEntryAdded { .. } | DomainEvent::WatchlistEntryRemoved { .. } => {
unreachable!("watchlist events are not published to NATS")
}
DomainEvent::WatchlistEntryAdded { .. } => "watchlist.entry.added",
DomainEvent::WatchlistEntryRemoved { .. } => "watchlist.entry.removed",
DomainEvent::FollowAccepted { .. } => "follow.accepted",
};
format!("{prefix}.{suffix}")