mirror of
https://github.com/wassname/talk.git
synced 2026-07-06 05:17:19 +08:00
hides the user status histories and tokens from the auth endpoints, which were resulting in errors
This commit is contained in:
+6
-2
@@ -205,9 +205,13 @@ const UserSchema = new Schema({
|
||||
|
||||
toJSON: {
|
||||
transform: function (doc, ret) {
|
||||
delete ret.password;
|
||||
delete ret._id;
|
||||
delete ret.__v;
|
||||
delete ret._id;
|
||||
delete ret.password;
|
||||
delete ret.status.username.history;
|
||||
delete ret.status.banned.history;
|
||||
delete ret.status.suspension.history;
|
||||
delete ret.tokens;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user