Login user

This commit is contained in:
KGrzeg 2021-10-17 21:12:42 +02:00
parent febdc7b5c1
commit 73a3870ecf
3 changed files with 48 additions and 10 deletions

View file

@ -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