mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-01 03:25:04 +03:00
Fixing in user.js
This commit is contained in:
parent
8178709f67
commit
0144741a97
1 changed files with 4 additions and 2 deletions
|
@ -33,7 +33,9 @@ module.exports = class User {
|
||||||
const user = await UserModel.findOne({ name: Name });
|
const user = await UserModel.findOne({ name: Name });
|
||||||
if (!user) return null;
|
if (!user) return null;
|
||||||
|
|
||||||
const { name = "guest", avatar = "/images/guest.png", time = Date.now(), admin = false, deleted = false } = user;
|
const { id, name = "guest", avatar = "/images/guest.png", time = Date.now(), admin = false, deleted = false } = user;
|
||||||
|
|
||||||
|
this.id = Number(id);
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.avatar = avatar;
|
this.avatar = avatar;
|
||||||
this.time = time;
|
this.time = time;
|
||||||
|
|
Loading…
Reference in a new issue