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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user