change message form of workflow notify

This commit is contained in:
zhl 2023-04-05 18:03:20 +08:00
parent c8926d99be
commit 5e56a91bd3

View File

@ -28,13 +28,13 @@ class WorkFlowController extends BaseController {
@role('anon')
@router('post /workflow/notify')
async flowNotify(req, res) {
let { msg_signature, timestamp, nonce, xml, Encrypt } = req.params
let { msg_signature, timestamp, nonce, xml } = req.params
console.log(xml)
const signature = getSignature(TOKEN, timestamp, nonce, Encrypt)
const signature = getSignature(TOKEN, timestamp, nonce, xml.Encrypt)
if (msg_signature !== signature) {
throw new ZError(10, 'sign check failed')
}
const { message, id } = decrypt(AES_KEY, Encrypt)
const { message, id } = decrypt(AES_KEY, xml.Encrypt)
console.log(id)
console.log(message)
res.send('success')