From dbe6bfe46b69bc53660ec5cb3de1535ba7becd92 Mon Sep 17 00:00:00 2001 From: MAC003 Date: Tue, 29 Mar 2022 11:30:38 +0545 Subject: [PATCH] Refactored trans_api.py --- trans_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trans_api.py b/trans_api.py index a4e2e81..964ad53 100755 --- a/trans_api.py +++ b/trans_api.py @@ -24,9 +24,9 @@ class Config: } -@app.get('/codes') +@app.get('/codes',response_class=JSONResponse) async def get_codes()-> str: - return JSONResponse(constant.LANGUAGES) + return constant.LANGUAGES async def translate_munche(sentence:str,lang:str) -> dict: result_lang = detect(sentence)