Skip to content

Commit 518b5ba

Browse files
committed
fix(repository): fix methods in router
1 parent 986b21a commit 518b5ba

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

monobank_api_client/fastapi_mono/router.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ async def add_monobank(
1515
schema: MonoSchema, session: AsyncSession = Depends(async_session)
1616
) -> Dict:
1717
try:
18-
response = await crud.create_mono(schema, session)
19-
return response
18+
return await crud.create_mono(schema, session)
2019
except Exception as exc:
2120
exception = {"detail": str(exc)}
2221
return exception
@@ -29,8 +28,7 @@ async def change_monobank(
2928
session: AsyncSession = Depends(async_session),
3029
) -> Dict:
3130
try:
32-
response = await crud.update_mono(user, schema, session)
33-
return response
31+
return await crud.update_mono(user, schema, session)
3432
except Exception as exc:
3533
exception = {"detail": str(exc)}
3634
return exception
@@ -41,8 +39,7 @@ async def delete_monobank(
4139
user: str, session: AsyncSession = Depends(async_session)
4240
) -> Dict:
4341
try:
44-
response = await crud.delete_mono(user, session)
45-
return response
42+
return await crud.delete_mono(user, session)
4643
except Exception as exc:
4744
exception = {"detail": str(exc)}
4845
return exception
@@ -52,8 +49,7 @@ async def delete_monobank(
5249
async def currencies() -> Dict:
5350
try:
5451
mng = AsyncMonoManager()
55-
response = await mng.get_currencies()
56-
return response
52+
return await mng.get_currencies()
5753
except Exception as exc:
5854
exception = {"detail": str(exc)}
5955
return exception
@@ -63,8 +59,7 @@ async def currencies() -> Dict:
6359
async def currency(ccy_pair: str) -> Dict:
6460
try:
6561
mng = AsyncMonoManager()
66-
response = await mng.get_currency(ccy_pair)
67-
return response
62+
return await mng.get_currency(ccy_pair)
6863
except Exception as exc:
6964
exception = {"detail": str(exc)}
7065
return exception

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def readme():
88

99
setup(
1010
name="monobank_api_client",
11-
version="1.1.9",
11+
version="1.2.0",
1212
author="ihor.sotnyk",
1313
author_email="ihor.sotnyk@onix-systems.com",
1414
description="This module is designed for quick interaction with the monobank API.",

0 commit comments

Comments
 (0)