mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-27 11:41:36 +00:00
adjusted SSOSettings model and changed all code based on the model
This commit is contained in:
parent
b12a38d12b
commit
3cd09eecba
9 changed files with 251 additions and 103 deletions
|
|
@ -297,18 +297,20 @@ class ApiController {
|
|||
return res.sendStatus(403)
|
||||
}
|
||||
let SSOUpdate = req.body
|
||||
Logger.debug("SSOUpdate=", SSOUpdate)
|
||||
if (!SSOUpdate || !isObject(SSOUpdate)) {
|
||||
return res.status(500).send('Invalid settings update object')
|
||||
}
|
||||
|
||||
console.log("SSOUpdate", JSON.stringify(SSOUpdate))
|
||||
|
||||
var madeUpdates = this.db.SSOSettings.update(SSOUpdate)
|
||||
console.log("SSOUpdate", JSON.stringify(this.db.SSOSettings))
|
||||
if (madeUpdates) {
|
||||
await this.db.updateEntity('sso', this.db.SSOUpdate)
|
||||
await this.db.updateEntity('settings', this.db.SSOSettings)
|
||||
}
|
||||
return res.json({
|
||||
success: true,
|
||||
SSOUpdate: this.db.SSOUpdate
|
||||
SSOUpdate: this.db.SSOSettings
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue