mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2026-01-19 03:58:11 +00:00
base模块修改为全局中间件
This commit is contained in:
parent
1f977001e5
commit
5f8036c365
4
.vscode/config.code-snippets
vendored
4
.vscode/config.code-snippets
vendored
@ -14,8 +14,10 @@
|
|||||||
" name: 'xxx',",
|
" name: 'xxx',",
|
||||||
" // 模块描述",
|
" // 模块描述",
|
||||||
" description: 'xxx',",
|
" description: 'xxx',",
|
||||||
" // 中间件",
|
" // 中间件,只对本模块有效",
|
||||||
" middlewares: [],",
|
" middlewares: [],",
|
||||||
|
" // 中间件,全局有效",
|
||||||
|
" globalMiddlewares: [],",
|
||||||
" } as ModuleConfig;",
|
" } as ModuleConfig;",
|
||||||
"};"
|
"};"
|
||||||
],
|
],
|
||||||
|
|||||||
@ -11,6 +11,6 @@ export default (app: Application) => {
|
|||||||
// 模块描述
|
// 模块描述
|
||||||
description: '基础的权限管理功能,包括登录,权限校验',
|
description: '基础的权限管理功能,包括登录,权限校验',
|
||||||
// 中间件
|
// 中间件
|
||||||
middlewares: ['baseAuthorityMiddleware', 'baseLogMiddleware'],
|
globalMiddlewares: ['baseAuthorityMiddleware', 'baseLogMiddleware'],
|
||||||
} as ModuleConfig;
|
} as ModuleConfig;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user