Skip to content

Commit

Permalink
fix: User collection name fix (#1157)
Browse files Browse the repository at this point in the history
Co-authored-by: Adel ak <adel.lerow@aktechkw.com>
Co-authored-by: Léo Pradel <pradel.leo@gmail.com>
  • Loading branch information
3 people committed Aug 3, 2021
1 parent 3dc17c5 commit 1903183
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/loud-socks-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@accounts/mongo": patch
---

Fix `collectionName` option not used properly.
7 changes: 6 additions & 1 deletion packages/database-mongo/src/mongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,14 @@ export class Mongo implements DatabaseInterface {
this.db = db;
this.collection = this.db.collection(this.options.collectionName);
this.sessions = new MongoSessions({ ...this.options, database: this.db });
this.servicePassword = new MongoServicePassword({ ...this.options, database: this.db });
this.servicePassword = new MongoServicePassword({
...this.options,
userCollectionName: this.options.collectionName,
database: this.db,
});
this.serviceMagicLink = new MongoServiceMagicLink({
...this.options,
userCollectionName: this.options.collectionName,
database: this.db,
});
}
Expand Down

0 comments on commit 1903183

Please sign in to comment.