fix: remove unused watch_event_query binding, prefix dead field for clippy -D warnings
This commit is contained in:
@@ -3,13 +3,12 @@ use std::sync::Arc;
|
||||
use domain::ports::{
|
||||
AuthService, DiaryExporter, DiaryRepository, DocumentParser, EventPublisher,
|
||||
FederatedProfileQuery, GoalRepository, ImportProfileRepository, ImportSessionRepository,
|
||||
MetadataClient, MovieCommand, MovieProfileRepository, MovieQuery, ObjectStorage, PasswordHasher,
|
||||
PersonCommand, PersonEnrichmentClient, PersonQuery, PosterFetcherClient,
|
||||
MetadataClient, MovieCommand, MovieProfileRepository, MovieQuery, ObjectStorage,
|
||||
PasswordHasher, PersonCommand, PersonEnrichmentClient, PersonQuery, PosterFetcherClient,
|
||||
RefreshSessionRepository, RemoteGoalRepository, RemoteWatchlistRepository, ReviewRepository,
|
||||
SearchCommand, SearchPort, SocialQueryPort, StatsRepository, UserProfileFieldsRepository,
|
||||
UserRepository, UserSettingsRepository, WatchEventCommand, WatchEventQuery,
|
||||
WatchlistRepository,
|
||||
WebhookTokenRepository, WrapUpRepository, WrapUpStatsQuery,
|
||||
WatchlistRepository, WebhookTokenRepository, WrapUpRepository, WrapUpStatsQuery,
|
||||
};
|
||||
|
||||
use application::config::AppConfig;
|
||||
|
||||
@@ -40,9 +40,17 @@ impl IntoResponse for ApiError {
|
||||
match &self.0 {
|
||||
DomainError::InfrastructureError(_) => {
|
||||
tracing::error!("Internal error: {:?}", self.0);
|
||||
(status, axum::Json(serde_json::json!({"error": "internal server error"}))).into_response()
|
||||
(
|
||||
status,
|
||||
axum::Json(serde_json::json!({"error": "internal server error"})),
|
||||
)
|
||||
.into_response()
|
||||
}
|
||||
_ => (status, axum::Json(serde_json::json!({"error": self.0.to_string()}))).into_response(),
|
||||
_ => (
|
||||
status,
|
||||
axum::Json(serde_json::json!({"error": self.0.to_string()})),
|
||||
)
|
||||
.into_response(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ use std::sync::Arc;
|
||||
use anyhow::Context;
|
||||
use domain::ports::{
|
||||
AuthService, LocalApContentQuery, MetadataClient, ObjectStorage, PasswordHasher,
|
||||
PosterFetcherClient, RefreshSessionRepository, UserProfileFieldsRepository,
|
||||
WatchEventCommand, WatchEventQuery, WebhookTokenRepository,
|
||||
PosterFetcherClient, RefreshSessionRepository, UserProfileFieldsRepository, WatchEventCommand,
|
||||
WatchEventQuery, WebhookTokenRepository,
|
||||
};
|
||||
|
||||
pub use infra_wiring::DbPool;
|
||||
|
||||
@@ -19,7 +19,9 @@ use application::import::{
|
||||
DeleteImportProfileCommand, ExecuteImportCommand, SaveImportProfileCommand,
|
||||
},
|
||||
create_session as create_import_session, delete_profile as delete_import_profile,
|
||||
deps::{ApplyMappingDeps, ApplyProfileDeps, CreateSessionDeps, ExecuteImportDeps, SaveProfileDeps},
|
||||
deps::{
|
||||
ApplyMappingDeps, ApplyProfileDeps, CreateSessionDeps, ExecuteImportDeps, SaveProfileDeps,
|
||||
},
|
||||
execute as execute_import, list_profiles as list_import_profiles,
|
||||
save_profile as save_import_profile,
|
||||
};
|
||||
|
||||
@@ -204,7 +204,13 @@ pub async fn post_dismiss_single(
|
||||
event_ids: vec![event_id],
|
||||
};
|
||||
|
||||
match dismiss_watch_events::execute(state.app_ctx.repos.watch_event_command.clone(), state.app_ctx.repos.watch_event_query.clone(), cmd).await {
|
||||
match dismiss_watch_events::execute(
|
||||
state.app_ctx.repos.watch_event_command.clone(),
|
||||
state.app_ctx.repos.watch_event_query.clone(),
|
||||
cmd,
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(_) => Redirect::to("/watch-queue").into_response(),
|
||||
Err(e) => {
|
||||
let msg = encode_error(&e.to_string());
|
||||
|
||||
@@ -251,7 +251,8 @@ pub async fn get_watch_queue(
|
||||
let query = GetWatchQueueQuery {
|
||||
user_id: user.0.value(),
|
||||
};
|
||||
let events = get_watch_queue::execute(state.app_ctx.repos.watch_event_query.clone(), query).await?;
|
||||
let events =
|
||||
get_watch_queue::execute(state.app_ctx.repos.watch_event_query.clone(), query).await?;
|
||||
|
||||
let dtos = events
|
||||
.into_iter()
|
||||
@@ -326,7 +327,11 @@ pub async fn post_dismiss_watch_events(
|
||||
event_ids: req.event_ids,
|
||||
};
|
||||
|
||||
let dismissed =
|
||||
dismiss_watch_events::execute(state.app_ctx.repos.watch_event_command.clone(), state.app_ctx.repos.watch_event_query.clone(), cmd).await?;
|
||||
let dismissed = dismiss_watch_events::execute(
|
||||
state.app_ctx.repos.watch_event_command.clone(),
|
||||
state.app_ctx.repos.watch_event_query.clone(),
|
||||
cmd,
|
||||
)
|
||||
.await?;
|
||||
Ok(Json(DismissWatchResponse { dismissed }))
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use api_types::{
|
||||
ProfileFieldDto, ProfileResponse, ProfileViewData, UpdateProfileFieldsRequest,
|
||||
UserProfileBase, UserProfileResponse, UserStatsDto, UserSummaryDto, UsersResponse,
|
||||
ProfileFieldDto, ProfileResponse, ProfileViewData, UpdateProfileFieldsRequest, UserProfileBase,
|
||||
UserProfileResponse, UserStatsDto, UserSummaryDto, UsersResponse,
|
||||
};
|
||||
use utoipa::OpenApi;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user