Can delete a movement

This commit is contained in:
2025-04-19 22:00:27 +02:00
parent 89ffb558ac
commit 9d345b9c42
3 changed files with 17 additions and 0 deletions

View File

@ -27,3 +27,9 @@ pub async fn get_list_of_account(account_id: AccountInPath) -> HttpResult {
pub async fn get_single(movement: MovementInPath) -> HttpResult {
Ok(HttpResponse::Ok().json(movement.movement()))
}
/// Delete a movement
pub async fn delete(movement: MovementInPath) -> HttpResult {
movements_service::delete(movement.movement().id()).await?;
Ok(HttpResponse::Accepted().finish())
}