refactor: Use serializer for user model instead of formatJson
This commit is contained in:
@@ -143,17 +143,6 @@ class User extends Base {
|
||||
},
|
||||
});
|
||||
|
||||
$formatJson(json) {
|
||||
json = super.$formatJson(json);
|
||||
|
||||
delete json.password;
|
||||
delete json.deletedAt;
|
||||
delete json.resetPasswordToken;
|
||||
delete json.resetPasswordTokenSentAt;
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
login(password) {
|
||||
return bcrypt.compare(password, this.password);
|
||||
}
|
||||
|
Reference in New Issue
Block a user