(req, res)
| 429 | } |
| 430 | |
| 431 | async initializeServer(req, res) { |
| 432 | Logger.info(`[Server] Initializing new server`) |
| 433 | const newRoot = req.body.newRoot |
| 434 | const rootUsername = newRoot.username || 'root' |
| 435 | const rootPash = newRoot.password ? await this.auth.localAuthStrategy.hashPassword(newRoot.password) : '' |
| 436 | if (!rootPash) Logger.warn(`[Server] Creating root user with no password`) |
| 437 | await Database.createRootUser(rootUsername, rootPash, this.auth) |
| 438 | |
| 439 | res.sendStatus(200) |
| 440 | } |
| 441 | |
| 442 | /** |
| 443 | * Remove user media progress for items that no longer exist & remove seriesHideFrom that no longer exist |
no test coverage detected