Skip to content

Commit 36e8ec4

Browse files
committed
docs: 更新文档错误
1 parent b6fe7c6 commit 36e8ec4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

middlewares/auth/token/token.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (t *Token[T]) Middleware(next web.HandlerFunc, method, _, _ string) web.Han
9999
ctx.SetVar(tokenContext, token)
100100

101101
if v.Access != "" { // 刷新令牌
102-
// 删除令牌出错,不防碍其它功能的继承执行,所以只记录日志,不退出。
102+
// 删除令牌出错,不妨碍其它功能的继承执行,所以只记录日志,不退出。
103103
if err := errors.Join(t.store.DeleteToken(v.Access), t.store.DeleteToken(token)); err != nil {
104104
t.s.Logs().ERROR().Error(err)
105105
}

middlewares/skip/skip.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import "github.com/issue9/web"
1111
//
1212
// problemID 表示在条件为 false 时返回的错误码。
1313
func New(cond func(*web.Context) bool, problemID string) web.MiddlewareFunc {
14-
return web.MiddlewareFunc(func(next web.HandlerFunc, _, _, _ string) web.HandlerFunc {
14+
return func(next web.HandlerFunc, _, _, _ string) web.HandlerFunc {
1515
return func(ctx *web.Context) web.Responser {
1616
if cond(ctx) {
1717
return next(ctx)
1818
}
1919
return ctx.Problem(problemID)
2020
}
21-
})
21+
}
2222
}

0 commit comments

Comments
 (0)