|
@@ -1,7 +1,5 @@
|
|
|
import { App, Config, Inject, Middleware } from '@midwayjs/decorator';
|
|
|
-import * as _ from 'lodash';
|
|
|
-import { CoolUrlTagData, RESCODE, TagTypes } from '@cool-midway/core';
|
|
|
-import * as jwt from 'jsonwebtoken';
|
|
|
+import { CoolUrlTagData, } from '@cool-midway/core';
|
|
|
import { NextFunction, Context } from '@midwayjs/koa';
|
|
|
import {
|
|
|
IMiddleware,
|
|
@@ -64,7 +62,7 @@ export class BaseAuthorityMiddleware
|
|
|
if (sign !== vaSign) {
|
|
|
ctx.status = 401;
|
|
|
ctx.body = {
|
|
|
- code: RESCODE.AUTHFAIL,
|
|
|
+ code: ctx.status,
|
|
|
message: '签名不匹配,认证失败',
|
|
|
};
|
|
|
return;
|