Remove AI config approval flow
This commit is contained in:
@@ -15,7 +15,6 @@ func normalizeStoreSnapshot(snapshot StoreSnapshot) StoreSnapshot {
|
||||
snapshot.ServerInstances = rewriteSnapshotServerInstances(snapshot.ServerInstances, replacements)
|
||||
snapshot.RuntimeBindings = rewriteSnapshotRuntimeBindings(snapshot.RuntimeBindings, replacements)
|
||||
snapshot.PluginLifecycles = rewriteSnapshotPluginLifecycles(snapshot.PluginLifecycles, replacements)
|
||||
snapshot.AIConfigDiffs = rewriteSnapshotAIConfigDiffs(snapshot.AIConfigDiffs, replacements)
|
||||
snapshot.PluginDataRecords = retainedSnapshotPluginData(snapshot.PluginDataRecords, replacements)
|
||||
return snapshot
|
||||
}
|
||||
@@ -81,17 +80,6 @@ func rewriteSnapshotPluginLifecycles(values []domain.PluginLifecycleInstallation
|
||||
return out
|
||||
}
|
||||
|
||||
func rewriteSnapshotAIConfigDiffs(values []domain.AIConfigDiffPreview, replacements map[string]domain.GamePlugin) []domain.AIConfigDiffPreview {
|
||||
out := make([]domain.AIConfigDiffPreview, len(values))
|
||||
for index, value := range values {
|
||||
if kept, ok := replacements[value.PluginID]; ok {
|
||||
value.PluginID = kept.ID
|
||||
}
|
||||
out[index] = domain.CopyAIConfigDiffPreview(value)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func retainedSnapshotPluginData(values []domain.PluginDataRecord, replacements map[string]domain.GamePlugin) []domain.PluginDataRecord {
|
||||
byID := map[string]domain.PluginDataRecord{}
|
||||
for _, value := range values {
|
||||
|
||||
Reference in New Issue
Block a user