Get accounts and balances

This commit is contained in:
2025-04-21 12:08:12 +02:00
parent f5b0ae49ca
commit 6ee250d872
5 changed files with 72 additions and 5 deletions

View File

@@ -17,6 +17,11 @@ pub async fn create(auth: AuthExtractor, req: web::Json<UpdateMovementQuery>) ->
Ok(HttpResponse::Created().finish())
}
/// Get the balances of all the accounts of the user
pub async fn get_accounts_balances(auth: AuthExtractor) -> HttpResult {
Ok(HttpResponse::Ok().json(movements_service::get_balances(auth.user_id()).await?))
}
/// Get the list of movements of an account
pub async fn get_list_of_account(account_id: AccountInPath) -> HttpResult {
Ok(HttpResponse::Ok()