修复了一些错误 更新了AI.md(给ai看的)

This commit is contained in:
Falck
2026-05-02 19:21:50 +08:00
parent 0783428f80
commit 70c531860b
240 changed files with 5626 additions and 10790 deletions

View File

@@ -1,21 +1,2 @@
"""Web 路由器"""
from typing import Callable, Optional, Any
from oss.shared.router import BaseRouter, match_path
class WebRouter(BaseRouter):
"""Web 路由器"""
def handle(self, request: dict) -> Optional[Any]:
"""处理请求"""
method = request.get("method", "GET")
path = request.get("path", "/")
result = self.find_route(method, path)
if result:
route, params = result
# 将路径参数注入到请求中
request["path_params"] = params
return route.handler(request)
return None