Spaces:
Runtime error
Runtime error
Siddhant
commited on
main returned data
Browse files
main.py
CHANGED
|
@@ -29,8 +29,7 @@ def get_top_questions_(limit: int = 5, Authorization: Annotated[list[str] | None
|
|
| 29 |
if Authorization is None or Authorization[0] != "Bearer {}".format(token):
|
| 30 |
raise HTTPException(status_code=401, detail="Unauthorised.")
|
| 31 |
try:
|
| 32 |
-
|
| 33 |
-
return {'data': 'success'}
|
| 34 |
except Exception as e:
|
| 35 |
# return a success message
|
| 36 |
raise HTTPException(status_code=400, detail=str(e))
|
|
|
|
| 29 |
if Authorization is None or Authorization[0] != "Bearer {}".format(token):
|
| 30 |
raise HTTPException(status_code=401, detail="Unauthorised.")
|
| 31 |
try:
|
| 32 |
+
return {'data': return_top_question(limit)}
|
|
|
|
| 33 |
except Exception as e:
|
| 34 |
# return a success message
|
| 35 |
raise HTTPException(status_code=400, detail=str(e))
|