aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/api_colors.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/admin/api_colors.go')
-rw-r--r--internal/admin/api_colors.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/admin/api_colors.go b/internal/admin/api_colors.go
index 7989e35..b6285c4 100644
--- a/internal/admin/api_colors.go
+++ b/internal/admin/api_colors.go
@@ -12,6 +12,7 @@ import (
"thehouseoficarus/internal/color"
"thehouseoficarus/internal/config"
"thehouseoficarus/internal/game"
+ "thehouseoficarus/internal/persistence"
)
// colorCategory describes one editable color category: its config key, a
@@ -595,13 +596,13 @@ func (s *AdminServer) writeConfigFile() error {
if merr != nil {
return merr
}
- return os.WriteFile(s.configPath, out, 0644)
+ return persistence.WriteFile(s.configPath, out, 0644)
}
out, err := patchColorMaps(data, s.cfg.DefaultColors, s.cfg.ConstantColors)
if err != nil {
return err
}
- return os.WriteFile(s.configPath, out, 0644)
+ return persistence.WriteFile(s.configPath, out, 0644)
}
// backupConfigFile copies the current config.yaml next to itself before an
@@ -615,7 +616,7 @@ func (s *AdminServer) backupConfigFile() error {
}
return err
}
- return os.WriteFile(s.configPath+".bak", data, 0600)
+ return persistence.WriteFile(s.configPath+".bak", data, 0600)
}
// patchColorMaps updates the default_colors and constant_colors mappings in a