Can get a single movement information

This commit is contained in:
2025-04-19 21:57:19 +02:00
parent 811e885bf3
commit 89ffb558ac
4 changed files with 82 additions and 0 deletions

View File

@ -1,6 +1,7 @@
use crate::controllers::HttpResult;
use crate::extractors::account_extractor::AccountInPath;
use crate::extractors::auth_extractor::AuthExtractor;
use crate::extractors::movement_extractor::MovementInPath;
use crate::services::movements_service;
use crate::services::movements_service::UpdateMovementQuery;
use actix_web::{HttpResponse, web};
@ -21,3 +22,8 @@ pub async fn get_list_of_account(account_id: AccountInPath) -> HttpResult {
Ok(HttpResponse::Ok()
.json(movements_service::get_list_account(account_id.as_ref().id()).await?))
}
/// Get a single movement information
pub async fn get_single(movement: MovementInPath) -> HttpResult {
Ok(HttpResponse::Ok().json(movement.movement()))
}