fmt
This commit is contained in:
@@ -13,8 +13,7 @@ use std::collections::HashMap;
|
||||
|
||||
use crate::render::render_page;
|
||||
use application::import::{
|
||||
apply_mapping as apply_import_mapping,
|
||||
apply_profile as apply_import_profile,
|
||||
apply_mapping as apply_import_mapping, apply_profile as apply_import_profile,
|
||||
commands::{
|
||||
ApplyImportMappingCommand, ApplyImportProfileCommand, CreateImportSessionCommand,
|
||||
DeleteImportProfileCommand, ExecuteImportCommand, SaveImportProfileCommand,
|
||||
@@ -911,17 +910,18 @@ pub async fn api_apply_profile(
|
||||
} else {
|
||||
StatusCode::UNPROCESSABLE_ENTITY
|
||||
};
|
||||
return (status, axum::Json(serde_json::json!({"error": e.to_string()}))).into_response();
|
||||
return (
|
||||
status,
|
||||
axum::Json(serde_json::json!({"error": e.to_string()})),
|
||||
)
|
||||
.into_response();
|
||||
}
|
||||
|
||||
let session = match state
|
||||
.app_ctx
|
||||
.repos
|
||||
.import_session
|
||||
.get(
|
||||
&ImportSessionId::from_uuid(session_id),
|
||||
&user_id,
|
||||
)
|
||||
.get(&ImportSessionId::from_uuid(session_id), &user_id)
|
||||
.await
|
||||
{
|
||||
Ok(Some(s)) => s,
|
||||
|
||||
@@ -114,7 +114,9 @@ pub async fn get_person_handler(
|
||||
place_of_birth: person.place_of_birth().map(str::to_string),
|
||||
also_known_as: person.also_known_as().to_vec(),
|
||||
homepage: person.homepage().map(str::to_string),
|
||||
imdb_url: person.imdb_id().map(|id| format!("https://www.imdb.com/name/{id}")),
|
||||
imdb_url: person
|
||||
.imdb_id()
|
||||
.map(|id| format!("https://www.imdb.com/name/{id}")),
|
||||
enriched: person.enriched_at().is_some(),
|
||||
})
|
||||
.into_response(),
|
||||
@@ -150,7 +152,10 @@ pub async fn get_person_credits_handler(
|
||||
place_of_birth: credits.person.place_of_birth().map(str::to_string),
|
||||
also_known_as: credits.person.also_known_as().to_vec(),
|
||||
homepage: credits.person.homepage().map(str::to_string),
|
||||
imdb_url: credits.person.imdb_id().map(|id| format!("https://www.imdb.com/name/{id}")),
|
||||
imdb_url: credits
|
||||
.person
|
||||
.imdb_id()
|
||||
.map(|id| format!("https://www.imdb.com/name/{id}")),
|
||||
enriched: credits.person.enriched_at().is_some(),
|
||||
},
|
||||
cast: credits
|
||||
|
||||
@@ -15,8 +15,7 @@ use domain::{
|
||||
models::{
|
||||
DiaryEntry, DiaryFilter, EntityType, FeedEntry, IndexableDocument, Movie, Person,
|
||||
PersonCredits, PersonEnrichmentData, PersonId, Review, ReviewHistory, SearchQuery,
|
||||
SearchResults, UserStats,
|
||||
UserTrends,
|
||||
SearchResults, UserStats, UserTrends,
|
||||
collections::{PageParams, Paginated},
|
||||
},
|
||||
ports::{
|
||||
|
||||
@@ -15,8 +15,7 @@ use domain::{
|
||||
events::DomainEvent,
|
||||
models::{
|
||||
EntityType, ExternalPersonId, IndexableDocument, Movie, Person, PersonCredits,
|
||||
PersonEnrichmentData, PersonId,
|
||||
SearchQuery, SearchResults, User,
|
||||
PersonEnrichmentData, PersonId, SearchQuery, SearchResults, User,
|
||||
},
|
||||
ports::{
|
||||
AuthService, EventPublisher, GeneratedToken, MetadataClient, MetadataSearchCriteria,
|
||||
|
||||
Reference in New Issue
Block a user