forgot to await a promise

This commit is contained in:
Erik 2022-11-09 17:25:08 +02:00
parent e164756886
commit 5274059ca4
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ class UserDatabase extends AbstractUserDatabase {
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;
const user = this._createUser(data);

View File

@ -50,7 +50,7 @@ class User {
get json () {
return {
id: this.id,
_id: this.id,
name: this.name,
type: this.type,
permissions: this.permissions,