Ver Fonte

Optimize kui usage (#67)

Aber há 2 anos atrás
pai
commit
0847f68e9c
1 ficheiros alterados com 2 adições e 9 exclusões
  1. 2 9
      tools/api_server.py

+ 2 - 9
tools/api_server.py

@@ -448,15 +448,8 @@ app = Kui(
         HTTPException: http_execption_handler,
         HTTPException: http_execption_handler,
         Exception: other_exception_handler,
         Exception: other_exception_handler,
     },
     },
-)
-app.router = Router(
-    [],
-    http_middlewares=[
-        app.exception_middleware,
-        allow_cors(),
-    ],
+    cors_config={},
 )
 )
 
 
 # Swagger UI & routes
 # Swagger UI & routes
-app.router << ("/v1" // routes)
-app.router << ("/docs" // OpenAPI().routes)
+app.router << ("/v1" // routes) << ("/docs" // OpenAPI().routes)