refactor: Use serializer for user model instead of formatJson

This commit is contained in:
Faruk AYDIN
2024-02-15 02:19:24 +01:00
parent 3578f6b849
commit 6ff29b9ae6

View File

@@ -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) { login(password) {
return bcrypt.compare(password, this.password); return bcrypt.compare(password, this.password);
} }