Skip to content

Commit 5fb4049

Browse files
committed
[docs] updated readme with new interface
1 parent 0553e6b commit 5fb4049

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ async function myFunction() {
4545

4646
const adapter = await MongoAdapter.newAdapter({
4747
uri: 'mongodb://localhost:27017',
48-
collectionName: 'casbin',
49-
databaseName: 'node-casbin-official'
48+
collection: 'casbin',
49+
database: 'node-casbin-official'
5050
});
5151

5252
const e = await newEnforcer(model, adapter);
@@ -77,8 +77,8 @@ import { MongoAdapter } from 'casbin-mongodb-adapter';
7777

7878
const adapter = await MongoAdapter.newAdapter({
7979
uri: 'mongodb://localhost:27017',
80-
collectionName: 'casbin',
81-
databaseName: 'node-casbin-official',
80+
collection: 'casbin',
81+
database: 'node-casbin-official',
8282
option: {
8383
...mongoOptions
8484
}

0 commit comments

Comments
 (0)