Skip to content

Commit fc45373

Browse files
committed
[ci skip] Fixed readme example
1 parent 5f113a8 commit fc45373

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ server.route({
4444
server.route({
4545
method: 'POST',
4646
path: '/add',
47-
handler: function (request, h) {
48-
return server.hemera.act({ topic: 'math', cmd: 'add', a: 2, b: 2 })
47+
handler: async function (request, h) {
48+
let resp = server.hemera.act({ topic: 'math', cmd: 'add', a: 2, b: 2 })
49+
// access result
50+
resp.data
51+
// retain parent context
52+
resp = resp.context.act(...)
4953
}
5054
}
5155
```

0 commit comments

Comments
 (0)