watchlist backfill
This commit is contained in:
@@ -375,3 +375,27 @@ pub trait RemoteWatchlistRepository: Send + Sync {
|
||||
uuid: uuid::Uuid,
|
||||
) -> Result<Vec<RemoteWatchlistEntry>, DomainError>;
|
||||
}
|
||||
|
||||
/// Read-only query port used exclusively by the ActivityPub adapter.
|
||||
/// Consolidates all reads the AP adapter needs so it never touches write repositories.
|
||||
#[async_trait]
|
||||
pub trait LocalApContentQuery: Send + Sync {
|
||||
async fn get_local_reviews_for_user(
|
||||
&self,
|
||||
user_id: &UserId,
|
||||
) -> Result<Vec<DiaryEntry>, DomainError>;
|
||||
|
||||
async fn get_local_watchlist_for_user(
|
||||
&self,
|
||||
user_id: &UserId,
|
||||
) -> Result<Vec<WatchlistWithMovie>, DomainError>;
|
||||
|
||||
async fn get_review_by_id(
|
||||
&self,
|
||||
review_id: &ReviewId,
|
||||
) -> Result<Option<Review>, DomainError>;
|
||||
|
||||
async fn get_movie_by_id(&self, movie_id: &MovieId) -> Result<Option<Movie>, DomainError>;
|
||||
|
||||
async fn count_local_posts(&self) -> Result<u64, DomainError>;
|
||||
}
|
||||
|
||||
@@ -668,6 +668,27 @@ impl DocumentParser for PanicDocumentParser {
|
||||
|
||||
// ── PanicProfileFieldsRepo ────────────────────────────────────────────────────
|
||||
|
||||
pub struct PanicRemoteWatchlistRepository;
|
||||
|
||||
#[async_trait]
|
||||
impl crate::ports::RemoteWatchlistRepository for PanicRemoteWatchlistRepository {
|
||||
async fn save(&self, _: crate::models::RemoteWatchlistEntry) -> Result<(), DomainError> {
|
||||
panic!("PanicRemoteWatchlistRepository called")
|
||||
}
|
||||
async fn remove_by_ap_id(&self, _: &str, _: &str) -> Result<(), DomainError> {
|
||||
panic!("PanicRemoteWatchlistRepository called")
|
||||
}
|
||||
async fn get_by_actor_url(&self, _: &str) -> Result<Vec<crate::models::RemoteWatchlistEntry>, DomainError> {
|
||||
panic!("PanicRemoteWatchlistRepository called")
|
||||
}
|
||||
async fn remove_all_by_actor(&self, _: &str) -> Result<(), DomainError> {
|
||||
panic!("PanicRemoteWatchlistRepository called")
|
||||
}
|
||||
async fn get_by_derived_uuid(&self, _: uuid::Uuid) -> Result<Vec<crate::models::RemoteWatchlistEntry>, DomainError> {
|
||||
panic!("PanicRemoteWatchlistRepository called")
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PanicProfileFieldsRepo;
|
||||
|
||||
#[async_trait]
|
||||
|
||||
Reference in New Issue
Block a user