application: library bounded context
This commit is contained in:
23
crates/application/src/library/list_shows.rs
Normal file
23
crates/application/src/library/list_shows.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
use domain::models::ShowSummary;
|
||||
use domain::DomainResult;
|
||||
|
||||
use super::deps::LibraryQueryDeps;
|
||||
use super::queries::ListShowsQuery;
|
||||
|
||||
/// List TV show summaries, optionally filtered.
|
||||
pub async fn execute(
|
||||
deps: &LibraryQueryDeps,
|
||||
query: ListShowsQuery,
|
||||
) -> DomainResult<Vec<ShowSummary>> {
|
||||
deps.library_query
|
||||
.list_shows(
|
||||
query.provider_id.as_deref(),
|
||||
query.search_term.as_deref(),
|
||||
&query.genres,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "tests/list_shows.rs"]
|
||||
mod tests;
|
||||
Reference in New Issue
Block a user