mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 23:57:49 +01:00
get users
This commit is contained in:
@@ -32,6 +32,13 @@ UserSchema.methods.generateJwt = function () {
|
||||
return jwt.sign({ id: this._id, username: this.username }, secret, { expiresIn: '6m' });
|
||||
};
|
||||
|
||||
UserSchema.methods.toJson = function () {
|
||||
return {
|
||||
id: this._id,
|
||||
username: this.username,
|
||||
};
|
||||
};
|
||||
|
||||
UserSchema.methods.toAuthJson = function () {
|
||||
return {
|
||||
id: this._id,
|
||||
|
||||
Reference in New Issue
Block a user