mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-29 03:42:42 +01:00
Adding and deleting users
This commit is contained in:
1 parent
88c7c1632e
commit
23f343f1df
15 files changed
+323
-12
No files matched your search
+1
-2
@@ -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' })
|
||||
|
||||
Reference in new issue
Block a user