mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-20 13:53:19 +01:00
Sequelize and sqlite init with test user model
This commit is contained in:
@@ -17,6 +17,7 @@ const Auth = require('./Auth')
|
||||
const Watcher = require('./Watcher')
|
||||
const Scanner = require('./scanner/Scanner')
|
||||
const Db = require('./Db')
|
||||
const Database = require('./Database')
|
||||
const SocketAuthority = require('./SocketAuthority')
|
||||
|
||||
const ApiRouter = require('./routers/ApiRouter')
|
||||
@@ -110,6 +111,10 @@ class Server {
|
||||
await this.db.init()
|
||||
}
|
||||
|
||||
// TODO: Test new db connection
|
||||
await Database.init()
|
||||
await Database.createTestUser()
|
||||
|
||||
// Create token secret if does not exist (Added v2.1.0)
|
||||
if (!this.db.serverSettings.tokenSecret) {
|
||||
await this.auth.initTokenSecret()
|
||||
|
||||
Reference in New Issue
Block a user