add config version

This commit is contained in:
DeniskaRediska committed 2020-06-03 11:33:52 +03:00
1 parent 83176ba878
commit 384fa0417a
6 files changed
+26 -4

No files matched your search

+4 -1
View File
@@ -67,7 +67,10 @@ func (c *config) CreateUpdateConfig(config domain.CreateUpdateConfigRequest) (*d
Config: config.Config,
Unsafe: config.Unsafe,
}
if config.Id == "" {
if config.Id == "" || config.CreateNew {
if config.CreateNew {
upsertConfig.Config.Version++
}
upsertConfig.Config.Id = state.GenerateId()
upsertConfig.Create = true
}