Skip to content

Commit

Permalink
fix(README): Update code snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
germanattanasio committed Jun 18, 2019
1 parent ffd44d8 commit c48ff68
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@ Messages can be labeled with customer id by adding `x-watson-metadata` header to

```js
watsonMiddleware.before = async (message, payload) => {
// it is up to you to implement calculateCustomerId function
customerId = calculateCustomerId(payload.context);
payload.headers['X-Watson-Metadata'] = 'customer_id=' + customerId;

return payload;
// it is up to you to implement calculateCustomerId function
customerId = calculateCustomerId(payload.context);
payload.headers['X-Watson-Metadata'] = 'customer_id=' + customerId;
return payload;
};
```

Expand Down

0 comments on commit c48ff68

Please sign in to comment.