Update README.md
This commit is contained in:
parent
b111b3f327
commit
2d257bfb1e
10
README.md
10
README.md
@ -91,9 +91,17 @@ function onAuthorizeFail(data, message, error, accept){
|
||||
throw new Error(message);
|
||||
} else {
|
||||
console.log(message);
|
||||
accept(null, false); // the same accept-method as above
|
||||
// the same accept-method as above in the success-callback
|
||||
accept(null, false);
|
||||
}
|
||||
}
|
||||
|
||||
// or
|
||||
// This function accepts every client unless there's an error
|
||||
function onAuthorizeFail(data, message, error, accept){
|
||||
console.log(message);
|
||||
accept(null, !error);
|
||||
}
|
||||
```
|
||||
You can use the `message` parameter for debugging/logging/etc uses.
|
||||
|
||||
|
Reference in New Issue
Block a user