feat(GODT-2709): Remove the config status file when user is removed.

This commit is contained in:
Romain LE JEUNE
2023-06-30 14:48:42 +02:00
parent 6df5a82364
commit 234554b459
3 changed files with 16 additions and 4 deletions

View File

@ -170,6 +170,12 @@ func (status *ConfigurationStatus) AutoconfigUsed(client string) error {
return nil
}
func (status *ConfigurationStatus) Remove() error {
status.DataLock.Lock()
defer status.DataLock.Unlock()
return os.Remove(status.FilePath)
}
func (data *ConfigurationStatusData) init() {
data.Metadata = Metadata{
Version: version,