mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 22:20:30 +08:00
修复忽略权限数据重复
This commit is contained in:
parent
9a5d42c5bf
commit
70a03871f8
@ -23,7 +23,7 @@ export class UserMiddleware implements IMiddleware<Context, NextFunction> {
|
||||
|
||||
resolve() {
|
||||
return async (ctx: Context, next: NextFunction) => {
|
||||
this.ignoreUrls = this.ignoreUrls.concat(
|
||||
const ignoreUrls = this.ignoreUrls.concat(
|
||||
this.coolUrlTagData.byKey(TagTypes.IGNORE_TOKEN)
|
||||
);
|
||||
let { url } = ctx;
|
||||
@ -41,7 +41,7 @@ export class UserMiddleware implements IMiddleware<Context, NextFunction> {
|
||||
return;
|
||||
}
|
||||
} catch (error) {}
|
||||
if (this.ignoreUrls.includes(url)) {
|
||||
if (ignoreUrls.includes(url)) {
|
||||
await next();
|
||||
return;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user