[enh] Refresh screen if config panel succeed

This commit is contained in:
ljf 2021-09-17 03:13:40 +02:00
parent 338c679287
commit 25a7a246ba

View file

@ -161,6 +161,15 @@ export default {
api.put(
`apps/${this.id}/config`, { key: id_, args }, { key: 'apps.update_config', name: this.id }
).then(response => {
api.get(
`apps/${this.id}/config-panel?full`, {}, { key: 'apps.get_config', name: this.id }
).then(response => {
this.onQueriesResponse(response)
}).catch(err => {
if (err.name !== 'APIBadRequestError') throw err
const panel = this.panels.find(({ id }) => id_ === id)
this.$set(panel, 'serverError', err.message)
})
}).catch(err => {
if (err.name !== 'APIBadRequestError') throw err
const panel = this.panels.find(({ id }) => id_ === id)