inbox rate limiting + poster storage cleanup

This commit is contained in:
2026-05-11 01:07:21 +02:00
parent b2a2aa4262
commit 8a254346f4
11 changed files with 158 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ use chrono::NaiveDateTime;
use crate::{
errors::DomainError,
value_objects::{ExternalMetadataId, MovieId, Rating, ReviewId, UserId},
value_objects::{ExternalMetadataId, MovieId, PosterPath, Rating, ReviewId, UserId},
};
#[derive(Clone, Debug)]
@@ -26,6 +26,10 @@ pub enum DomainEvent {
movie_id: MovieId,
external_metadata_id: ExternalMetadataId,
},
MovieDeleted {
movie_id: MovieId,
poster_path: Option<PosterPath>,
},
}
#[async_trait]

View File

@@ -158,6 +158,8 @@ pub trait PosterStorage: Send + Sync {
) -> Result<PosterPath, DomainError>;
async fn get_poster(&self, poster_path: &PosterPath) -> Result<Vec<u8>, DomainError>;
async fn delete_poster(&self, path: &PosterPath) -> Result<(), DomainError>;
}
pub struct GeneratedToken {