change sth
This commit is contained in:
parent
3551e5084c
commit
4b1ad8511d
@ -19,7 +19,7 @@ class WorkFlowController extends BaseController {
|
|||||||
let { msg_signature, timestamp, nonce, echostr } = req.params
|
let { msg_signature, timestamp, nonce, echostr } = req.params
|
||||||
const signature = getSignature(TOKEN, timestamp, nonce, echostr)
|
const signature = getSignature(TOKEN, timestamp, nonce, echostr)
|
||||||
if (msg_signature !== signature) {
|
if (msg_signature !== signature) {
|
||||||
throw new ZError(10, 'params mismatch')
|
throw new ZError(10, 'sign check failed')
|
||||||
}
|
}
|
||||||
const { message, id } = decrypt(AES_KEY, echostr)
|
const { message, id } = decrypt(AES_KEY, echostr)
|
||||||
res.send(message)
|
res.send(message)
|
||||||
@ -29,9 +29,10 @@ class WorkFlowController extends BaseController {
|
|||||||
@router('post /workflow/notify')
|
@router('post /workflow/notify')
|
||||||
async flowNotify(req, res) {
|
async flowNotify(req, res) {
|
||||||
let { msg_signature, timestamp, nonce, Encrypt } = req.params
|
let { msg_signature, timestamp, nonce, Encrypt } = req.params
|
||||||
|
console.log(Encrypt)
|
||||||
const signature = getSignature(TOKEN, timestamp, nonce, Encrypt)
|
const signature = getSignature(TOKEN, timestamp, nonce, Encrypt)
|
||||||
if (msg_signature !== signature) {
|
if (msg_signature !== signature) {
|
||||||
throw new ZError(10, 'params mismatch')
|
throw new ZError(10, 'sign check failed')
|
||||||
}
|
}
|
||||||
const { message, id } = decrypt(AES_KEY, Encrypt)
|
const { message, id } = decrypt(AES_KEY, Encrypt)
|
||||||
console.log(id)
|
console.log(id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user