mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
Sequelize and sqlite init with test user model
This commit is contained in:
parent
a2d4a4a906
commit
b8ab72a141
6 changed files with 2452 additions and 19 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue