Login user
This commit is contained in:
parent
febdc7b5c1
commit
73a3870ecf
3 changed files with 48 additions and 10 deletions
|
|
@ -28,6 +28,10 @@ class Database {
|
|||
await this.db.write()
|
||||
return user
|
||||
}
|
||||
|
||||
getUserByPassword(password) {
|
||||
return this.db.data.users.find(user => user.password === password)
|
||||
}
|
||||
}
|
||||
|
||||
export default new Database
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue