mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-24 17:59:06 +02:00
Update Dockerfile for sqlite3, update models for cascade delete, fix backup schedule
This commit is contained in:
parent
254ba1f089
commit
f73a0cce72
20 changed files with 67 additions and 31 deletions
|
@ -230,10 +230,10 @@ class Server {
|
|||
async initializeServer(req, res) {
|
||||
Logger.info(`[Server] Initializing new server`)
|
||||
const newRoot = req.body.newRoot
|
||||
let rootPash = newRoot.password ? await this.auth.hashPass(newRoot.password) : ''
|
||||
const rootUsername = newRoot.username || 'root'
|
||||
const rootPash = newRoot.password ? await this.auth.hashPass(newRoot.password) : ''
|
||||
if (!rootPash) Logger.warn(`[Server] Creating root user with no password`)
|
||||
let rootToken = await this.auth.generateAccessToken({ userId: 'root', username: newRoot.username })
|
||||
await Database.createRootUser(newRoot.username, rootPash, rootToken)
|
||||
await Database.createRootUser(rootUsername, rootPash, this.auth)
|
||||
|
||||
res.sendStatus(200)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue