Can get the list of movements of an account
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
use crate::controllers::HttpResult;
|
||||
use crate::extractors::account_extractor::AccountInPath;
|
||||
use crate::extractors::auth_extractor::AuthExtractor;
|
||||
use crate::services::movements_service;
|
||||
use crate::services::movements_service::UpdateMovementQuery;
|
||||
@ -14,3 +15,9 @@ pub async fn create(auth: AuthExtractor, req: web::Json<UpdateMovementQuery>) ->
|
||||
|
||||
Ok(HttpResponse::Created().finish())
|
||||
}
|
||||
|
||||
/// Get the list of movements of an account
|
||||
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?))
|
||||
}
|
||||
|
Reference in New Issue
Block a user