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