Skip to content

Commit

Permalink
docs: usage of register<OperationId>Middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushik-rishi committed Oct 1, 2023
1 parent 7427f29 commit df2310b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ function testSubscribe() {
// Registering your custom logic in a channel-specific handler
// the passed handler functions are called once the app gets message sent to the channel

client.receiveLightMeasurement((message) => { // `recieveLightMeasurement` is the respective operationId
client.registerReceiveLightMeasurementMiddleware((message) => { // `recieveLightMeasurement` is the respective operationId
console.log("recieved in middleware 1", message.payload);
});

client.receiveLightMeasurement((message) => {
client.registerReceiveLightMeasurementMiddleware((message) => {
console.log("recieved in middleware 2", message.payload);
});
}
Expand Down

0 comments on commit df2310b

Please sign in to comment.