mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-10 16:12:50 +00:00
修复忽略权限数组数据重复
This commit is contained in:
parent
9661ff8a6a
commit
9591431d01
@ -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…
x
Reference in New Issue
Block a user