forgot to await a promise
This commit is contained in:
parent
e164756886
commit
5274059ca4
@ -26,7 +26,7 @@ class UserDatabase extends AbstractUserDatabase {
|
|||||||
|
|
||||||
if (!force && this.cache.has(id)) return this.cache.get(id);
|
if (!force && this.cache.has(id)) return this.cache.get(id);
|
||||||
|
|
||||||
const data = this.collection.findOne({ _id: ObjectId(id) });
|
const data = await this.collection.findOne({ _id: ObjectId(id) });
|
||||||
if (!data) return null;
|
if (!data) return null;
|
||||||
|
|
||||||
const user = this._createUser(data);
|
const user = this._createUser(data);
|
||||||
|
@ -50,7 +50,7 @@ class User {
|
|||||||
|
|
||||||
get json () {
|
get json () {
|
||||||
return {
|
return {
|
||||||
id: this.id,
|
_id: this.id,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
type: this.type,
|
type: this.type,
|
||||||
permissions: this.permissions,
|
permissions: this.permissions,
|
||||||
|
Loading…
Reference in New Issue
Block a user