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
|
||||
const signature = getSignature(TOKEN, timestamp, nonce, echostr)
|
||||
if (msg_signature !== signature) {
|
||||
throw new ZError(10, 'params mismatch')
|
||||
throw new ZError(10, 'sign check failed')
|
||||
}
|
||||
const { message, id } = decrypt(AES_KEY, echostr)
|
||||
res.send(message)
|
||||
@ -29,9 +29,10 @@ class WorkFlowController extends BaseController {
|
||||
@router('post /workflow/notify')
|
||||
async flowNotify(req, res) {
|
||||
let { msg_signature, timestamp, nonce, Encrypt } = req.params
|
||||
console.log(Encrypt)
|
||||
const signature = getSignature(TOKEN, timestamp, nonce, Encrypt)
|
||||
if (msg_signature !== signature) {
|
||||
throw new ZError(10, 'params mismatch')
|
||||
throw new ZError(10, 'sign check failed')
|
||||
}
|
||||
const { message, id } = decrypt(AES_KEY, Encrypt)
|
||||
console.log(id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user