mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-05 10:44:32 +02:00
Add new API endpoint for updating auth-settings and update passport auth strategies
This commit is contained in:
parent
078cb0855f
commit
237fe84c54
5 changed files with 255 additions and 119 deletions
|
@ -199,13 +199,19 @@ export default {
|
|||
if (this.enableOpenIDAuth) this.newAuthSettings.authActiveAuthMethods.push('openid')
|
||||
|
||||
this.savingSettings = true
|
||||
const success = await this.$store.dispatch('updateServerSettings', this.newAuthSettings)
|
||||
this.savingSettings = false
|
||||
if (success) {
|
||||
this.$toast.success('Server settings updated')
|
||||
} else {
|
||||
this.$toast.error('Failed to update server settings')
|
||||
}
|
||||
this.$axios
|
||||
.$patch('/api/auth-settings', this.newAuthSettings)
|
||||
.then((data) => {
|
||||
this.$store.commit('setServerSettings', data.serverSettings)
|
||||
this.$toast.success('Server settings updated')
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Failed to update server settings', error)
|
||||
this.$toast.error('Failed to update server settings')
|
||||
})
|
||||
.finally(() => {
|
||||
this.savingSettings = false
|
||||
})
|
||||
},
|
||||
init() {
|
||||
this.newAuthSettings = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue