fix: server 审查修复——member_id 校验、访问日志 finally、静默初始化并发
非法 member_id 不再以 NaN 入库;HTTP 访问日志覆盖异常路径;setup-state 静默建管理员遇唯一冲突视为已初始化。
This commit is contained in:
@@ -40,8 +40,11 @@ export function createApp(opts: CreateAppOptions) {
|
||||
|
||||
app.use("*", async (c, next) => {
|
||||
const start = Date.now();
|
||||
await next();
|
||||
appLogger("http").info`${c.req.method} ${c.req.path} → ${c.res.status} · ${Date.now() - start}ms`;
|
||||
try {
|
||||
await next();
|
||||
} finally {
|
||||
appLogger("http").info`${c.req.method} ${c.req.path} → ${c.res.status} · ${Date.now() - start}ms`;
|
||||
}
|
||||
});
|
||||
app.use("*", async (c, next) => {
|
||||
c.set("repos", repos);
|
||||
|
||||
Reference in New Issue
Block a user