feat(xo-server/plugins): unload plugin on configuration purge (#6172)
This commit is contained in:
parent
4fe9a4eb59
commit
472bececb1
@ -1,5 +1,6 @@
|
||||
import Ajv from 'ajv'
|
||||
import mapToArray from 'lodash/map.js'
|
||||
import noop from 'lodash/noop.js'
|
||||
import { createLogger } from '@xen-orchestra/log'
|
||||
import { invalidParameters, noSuchObject } from 'xo-common/api-errors.js'
|
||||
|
||||
@ -238,6 +239,7 @@ export default class {
|
||||
}
|
||||
|
||||
async purgePluginConfiguration(id) {
|
||||
await this.unloadPlugin(id).catch(noop)
|
||||
await this._pluginsMetadata.merge(id, { configuration: undefined })
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user