Skip to content

Commit

Permalink
Merge pull request #28 from WangMingHua111/dev
Browse files Browse the repository at this point in the history
fix: 身份认证装饰器在控制器上时swagger不显示锁
  • Loading branch information
WangMingHua111 authored Dec 30, 2023
2 parents ed9a189 + 5ee9be7 commit b5cc729
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wangminghua/koa-restful",
"version": "1.0.10",
"version": "1.0.11",
"description": "Koa Restful 是一个基于 Koa 框架的 Restful Web API 插件开源库,使用 TypeScript 构建。它旨在提供一种轻量、高效、易用的方式来构建 RESTful 风格的后端服务。",
"main": "./dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/openapi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class AST2OpenAPI {
let isAuthorizeDecorator = false
for (const authorizeDecoratorName of this.authorizeDecorator) {
// 如果有鉴权装饰器时
if (method.getDecorator(authorizeDecoratorName)) {
if (cls.getDecorator(authorizeDecoratorName) || method.getDecorator(authorizeDecoratorName)) {
isAuthorizeDecorator = true
break
}
Expand Down

0 comments on commit b5cc729

Please sign in to comment.