我想从 onDone() 返回数据。我已经尝试过回复()功能,但它也无法正常工作。
server.route({
method: 'POST',
path: '/change-state/testing',
handler: function (request,h) {
return interpret(machine)
.onDone(e => {
console.log('_____________________')
console.log(e.data)
console.log('_____________________')
return e.data // I want to return e.data
})
.start();
}
});