| @@ -199,19 +199,6 @@ async def root(): | |||||
| return get_swagger_ui_html(openapi_url="/openapi.json", title="docs") | return get_swagger_ui_html(openapi_url="/openapi.json", title="docs") | ||||
| @app.get("/openapi.json/", tags=["Documentation"]) | |||||
| async def get_open_api_endpoint(): | |||||
| #async def get_open_api_endpoint(current_user: User = Depends(get_current_active_user)): | |||||
| return JSONResponse(get_openapi(title="MajorNet APIs", version="1.0", routes=app.routes)) | |||||
| @app.get("/docs/", tags=["Documentation"]) | |||||
| #async def get_documentation(current_user: User = Depends(get_current_active_user)): | |||||
| async def get_documentation(): | |||||
| if DEBUG: print("SONO IN /DOCS") | |||||
| return get_swagger_ui_html(openapi_url="/openapi.json", title="docs") | |||||
| @app.get("/ble-ai/infer", tags=["BLE-AI"], dependencies=[Depends(get_current_user)]) | @app.get("/ble-ai/infer", tags=["BLE-AI"], dependencies=[Depends(get_current_user)]) | ||||
| async def get_ble_ai_infer(mac: Optional[List[str]] = Query(default=None)): | async def get_ble_ai_infer(mac: Optional[List[str]] = Query(default=None)): | ||||
| path = config_env.BLE_AI_INFER_CSV | path = config_env.BLE_AI_INFER_CSV | ||||
| @@ -252,6 +239,19 @@ async def get_ble_ai_infer(mac: Optional[List[str]] = Query(default=None)): | |||||
| return {"items": items, "count": len(items)} | return {"items": items, "count": len(items)} | ||||
| @app.get("/openapi.json/", tags=["Documentation"]) | |||||
| async def get_open_api_endpoint(): | |||||
| #async def get_open_api_endpoint(current_user: User = Depends(get_current_active_user)): | |||||
| return JSONResponse(get_openapi(title="MajorNet APIs", version="1.0", routes=app.routes)) | |||||
| @app.get("/docs/", tags=["Documentation"]) | |||||
| #async def get_documentation(current_user: User = Depends(get_current_active_user)): | |||||
| async def get_documentation(): | |||||
| if DEBUG: print("SONO IN /DOCS") | |||||
| return get_swagger_ui_html(openapi_url="/openapi.json", title="docs") | |||||
| @app.post("/majortel/call/", tags=["Majortel"]) | @app.post("/majortel/call/", tags=["Majortel"]) | ||||
| async def route_call(active_user=Depends(manager),callerNumber=None, calledNumber=None): | async def route_call(active_user=Depends(manager),callerNumber=None, calledNumber=None): | ||||
| try: | try: | ||||