fix: remove unused watch_event_query binding, prefix dead field for clippy -D warnings
This commit is contained in:
@@ -1,15 +1,8 @@
|
||||
use domain::{
|
||||
errors::DomainError,
|
||||
events::DomainEvent,
|
||||
value_objects::UserId,
|
||||
};
|
||||
use domain::{errors::DomainError, events::DomainEvent, value_objects::UserId};
|
||||
|
||||
use super::{commands::DeleteGoalCommand, deps::GoalCommandDeps};
|
||||
|
||||
pub async fn execute(
|
||||
deps: &GoalCommandDeps,
|
||||
cmd: DeleteGoalCommand,
|
||||
) -> Result<(), DomainError> {
|
||||
pub async fn execute(deps: &GoalCommandDeps, cmd: DeleteGoalCommand) -> Result<(), DomainError> {
|
||||
let user_id = UserId::from_uuid(cmd.user_id);
|
||||
|
||||
let g = deps
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
use domain::{
|
||||
errors::DomainError,
|
||||
models::GoalWithProgress,
|
||||
value_objects::UserId,
|
||||
};
|
||||
use domain::{errors::DomainError, models::GoalWithProgress, value_objects::UserId};
|
||||
|
||||
use super::{deps::GoalQueryDeps, queries::GetGoalQuery};
|
||||
|
||||
@@ -12,11 +8,17 @@ pub async fn execute(
|
||||
) -> Result<Option<GoalWithProgress>, DomainError> {
|
||||
let user_id = UserId::from_uuid(query.user_id);
|
||||
|
||||
let found = deps.goal.find_by_user_and_year(&user_id, query.year).await?;
|
||||
let found = deps
|
||||
.goal
|
||||
.find_by_user_and_year(&user_id, query.year)
|
||||
.await?;
|
||||
|
||||
let Some(g) = found else { return Ok(None) };
|
||||
|
||||
let current_count = deps.stats.count_reviews_in_year(&user_id, query.year).await?;
|
||||
let current_count = deps
|
||||
.stats
|
||||
.count_reviews_in_year(&user_id, query.year)
|
||||
.await?;
|
||||
|
||||
Ok(Some(GoalWithProgress {
|
||||
goal: g,
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
use domain::{
|
||||
errors::DomainError,
|
||||
models::GoalWithProgress,
|
||||
value_objects::UserId,
|
||||
};
|
||||
use domain::{errors::DomainError, models::GoalWithProgress, value_objects::UserId};
|
||||
|
||||
use super::{deps::GoalQueryDeps, queries::ListGoalsQuery};
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
use domain::{
|
||||
errors::DomainError,
|
||||
events::DomainEvent,
|
||||
models::GoalWithProgress,
|
||||
value_objects::UserId,
|
||||
errors::DomainError, events::DomainEvent, models::GoalWithProgress, value_objects::UserId,
|
||||
};
|
||||
|
||||
use super::{commands::UpdateGoalCommand, deps::GoalCommandDeps};
|
||||
|
||||
Reference in New Issue
Block a user