Skip to content

Commit

Permalink
Refined response and request at bank router
Browse files Browse the repository at this point in the history
  • Loading branch information
4l3j0Ok committed Mar 28, 2024
1 parent 2f44c5c commit c77b45f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/routers/bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@


@router.get("/")
async def get(bank_id: str = None) -> Success:
async def get(bcra_id: str = None) -> Success:
"Retorna la lista de bancos o un usuario concreto en base al id."
success, result = functions.get_banks(bank_id, as_dict=True)
success, result = functions.get_banks(bcra_id, as_dict=True)
if not success:
raise HTTPException(
status_code=404,
Expand All @@ -21,7 +21,6 @@ async def get(bank_id: str = None) -> Success:
)
)
return Success(
input=bank_id if bank_id else None,
detail=Detail(
payload=result,
message=messages.MSG_SUCCESS_GENERIC
Expand Down Expand Up @@ -51,7 +50,7 @@ async def update_banks_list(credentials: AdminCredentials) -> Success:
)
return Success(
detail=Detail(
payload={"ids": result},
payload=None,
message=messages.MSG_SUCCESS_SAVE
)
)
Expand Down Expand Up @@ -79,7 +78,7 @@ def add_bank(bank: Bank, credentials: AdminCredentials) -> Success:
)
return Success(
detail=Detail(
payload={"id": result},
payload=None,
message=messages.MSG_SUCCESS_SAVE
)
)

0 comments on commit c77b45f

Please sign in to comment.