add post of workflow notify
This commit is contained in:
parent
f494a89f5c
commit
6948958cf3
@ -24,4 +24,18 @@ class WorkFlowController extends BaseController {
|
||||
const { message, id } = decrypt(AES_KEY, echostr)
|
||||
res.send(message)
|
||||
}
|
||||
|
||||
@role('anon')
|
||||
@router('post /workflow/notify')
|
||||
async flowNotify(req, res) {
|
||||
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')
|
||||
}
|
||||
const { message, id } = decrypt(AES_KEY, echostr)
|
||||
console.log(id)
|
||||
console.log(message)
|
||||
res.send('success')
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user