🐞 fix(加密): 去掉加密返回参数
This commit is contained in:
@@ -25,7 +25,6 @@ module.exports = options => {
|
||||
if (!reqBody.data) return;
|
||||
|
||||
let msgEncrypt = new MsgEncrypt({ encodeK: reqHeader['k'], encodeV: reqHeader['v'] });
|
||||
const { aesKey, aesIV } = msgEncrypt.getKv();
|
||||
|
||||
console.log(`encode str ${msgEncrypt.encryptMsg(reqBody)}`);
|
||||
|
||||
@@ -52,10 +51,10 @@ module.exports = options => {
|
||||
console.log('return value:', JSON.stringify(resBody));
|
||||
let resBodyWithEncrypt = msgEncrypt.encryptMsg(resBody);
|
||||
if (resBodyWithEncrypt) {
|
||||
ctx.body = { result: resBodyWithEncrypt, aesKey, aesIV };
|
||||
ctx.body = { result: resBodyWithEncrypt };
|
||||
ctx.service.utils.log('INFO', `[${ctx.request.url}] [${ctx.logcode}] res: ${JSON.stringify(resBody)}`)
|
||||
} else {
|
||||
ctx.body = { result: msgEncrypt.encryptMsg({ status: 3, data: 'internal err' }), aesKey, aesIV };
|
||||
ctx.body = { result: msgEncrypt.encryptMsg({ status: 3, data: 'internal err' }) };
|
||||
ctx.service.utils.log('ERROR', `[${ctx.request.url}] [${ctx.logcode}] res: ${resBody}`)
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user