diff --git a/README.md b/README.md index d2474db8..633d7bdc 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ const casbinjs = require('casbin.js'); const authorizer = new casbinjs.Authorizer('auto', {endpoint: 'http://Domain_name/casbin/api'}); // When the identity shifts, reset the user. Casbin.js will automatically fetch the permission from the endpoint. -authorizer.setUser("Tom"); +await authorizer.setUser("Tom"); // Evaluate the permission authorizer.can("read", "data1").then();