aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/api_colors.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 20:03:13 -0400
committerhistoria <[not public]>2026-09-18 20:03:13 -0400
commit79764732406d6484f67d3dec045483dcb5d08c28 (patch)
tree7a64e8581a540b97ed554f5723e2d587424ab1c6 /internal/admin/api_colors.go
parentf1e461ab6aec6b9bf056bbe2daa88a251e0f21da (diff)
downloadthehouseoficarus-79764732406d6484f67d3dec045483dcb5d08c28.tar.gz
feat: better card ascii art
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