Skip to content

Commit a0a8563

Browse files
docs: Update README [skip ci]
1 parent 47c18b5 commit a0a8563

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ const checkBalance = async (context) => {
234234
validAccount: true,
235235
accountBalance: 95.33
236236
};
237-
await Promise.resolve(context);
237+
return context;
238238
});
239239

240240
const processWatsonResponse = async (bot, message) => {
@@ -328,14 +328,14 @@ They can be customized as follows:
328328
```js
329329
middleware.before = (message, assistantPayload) => async () => {
330330
// Code here gets executed before making the call to Assistant.
331-
return await Promise.resolve(assistantPayload);
331+
return assistantPayload;
332332
}
333333
```
334334

335335
```js
336336
middleware.after = (message, assistantResponse) => async () => {
337337
// Code here gets executed after the call to Assistant.
338-
return await Promise.resolve(assistantResponse);
338+
return assistantResponse;
339339
});
340340
```
341341

0 commit comments

Comments
 (0)