mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-25 21:35:07 +02:00
Fix bug with undefined property
This commit is contained in:
parent
226a774ab9
commit
6aaf3f0f02
1 changed files with 2 additions and 2 deletions
|
@ -235,9 +235,9 @@ class Auth {
|
||||||
*/
|
*/
|
||||||
async initTokenSecret() {
|
async initTokenSecret() {
|
||||||
if (process.env.TOKEN_SECRET) { // User can supply their own token secret
|
if (process.env.TOKEN_SECRET) { // User can supply their own token secret
|
||||||
this.db.serverSettings.tokenSecret = process.env.TOKEN_SECRET
|
global.ServerSettings.tokenSecret = process.env.TOKEN_SECRET
|
||||||
} else {
|
} else {
|
||||||
this.db.serverSettings.tokenSecret = require('crypto').randomBytes(256).toString('base64')
|
global.ServerSettings.tokenSecret = require('crypto').randomBytes(256).toString('base64')
|
||||||
}
|
}
|
||||||
await Database.updateServerSettings()
|
await Database.updateServerSettings()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue