Skip to content

Commit

Permalink
fix: minor mistakes in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jyotman authored May 30, 2017
1 parent e615f2b commit 541ee04
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ It will be called when a client subscribes to a topic. Override to supply custom
authorization logic.

```js
instance.authorizeSubscribe = function (client, sub, cb) {
instance.authorizeSubscribe = function (client, sub, callback) {
if (sub.topic === 'aaaa') {
return cb(new Error('wrong topic'))
return callback(new Error('wrong topic'))
}

if (sub.topic === 'bbb') {
Expand All @@ -263,7 +263,7 @@ instance.authorizeSubscribe = function (client, sub, cb) {
To negate a subscription, set the subscription to `null`:

```js
instance.authorizeSubscribe = function (client, sub, cb) {
instance.authorizeSubscribe = function (client, sub, callback) {
if (sub.topic === 'aaaa') {
sub = null
}
Expand Down Expand Up @@ -300,7 +300,7 @@ instance.authorizeForward = function (clientId, packet) {

It will be called after a message is published.
`client` will be null for internal messages.
Ovverride to supply custom authorization logic.
Override to supply custom authorization logic.

-------------------------------------------------------
<a name="close"></a>
Expand Down

0 comments on commit 541ee04

Please sign in to comment.