23 lines
487 B
Rust
23 lines
487 B
Rust
use domain::models::ShowSummary;
|
|
use domain::DomainResult;
|
|
|
|
use super::deps::LibraryQueryDeps;
|
|
use super::queries::ListShowsQuery;
|
|
|
|
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;
|