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

Added route for registering an Account

This commit is contained in:
2022-02-13 22:11:15 +00:00
parent cbdbc92807
commit 401eaa56e1
2 changed files with 52 additions and 1 deletions

View File

@@ -61,7 +61,12 @@ class User {
}
login() {
login(req) {
req.session.authenticated = true;
req.session.userId = this.id;
req.session.userType = this.type;
req.session.fullName = `${this.firstName} ${this.lastName}`;
}
static async hashPassword(password) {
return await bcrypt.hash(password, 10);