1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 22:59:28 +00:00

Added User.getEmail

This commit is contained in:
2022-04-21 15:46:50 +00:00
parent f2d57a86fe
commit 67c4b510c1

View File

@@ -117,6 +117,10 @@ class User {
return `${this.firstName} ${this.lastName}`; return `${this.firstName} ${this.lastName}`;
} }
getEmail() {
return `${this.fullName} <${this.email}>`;
}
async verifyPassword(password) { async verifyPassword(password) {
return await bcrypt.compare(password, this.#password); return await bcrypt.compare(password, this.#password);
} }