inbox rate limiting + poster storage cleanup
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user