mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-10 01:15:06 +02:00
Adding and deleting users
This commit is contained in:
parent
88c7c1632e
commit
23f343f1df
15 changed files with 323 additions and 12 deletions
|
@ -2,7 +2,6 @@ const bcrypt = require('bcryptjs')
|
|||
const jwt = require('jsonwebtoken')
|
||||
const Logger = require('./Logger')
|
||||
|
||||
|
||||
class Auth {
|
||||
constructor(db) {
|
||||
this.db = db
|
||||
|
@ -90,7 +89,7 @@ class Auth {
|
|||
var password = req.body.password || ''
|
||||
Logger.debug('Check Auth', username, !!password)
|
||||
|
||||
var user = this.users.find(u => u.id === username)
|
||||
var user = this.users.find(u => u.username === username)
|
||||
|
||||
if (!user) {
|
||||
return res.json({ error: 'User not found' })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue