@@ -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(
5249async 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:
6359async 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
0 commit comments