mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-21 23:22:34 +01:00
fix(setup): reduce friction in installation procedure
- Add Language default ("jp") so missing field no longer produces empty
string, and include language selector in setup wizard
- Add --setup flag to re-run wizard even when config.json exists,
providing a recovery path for corrupted configs
- Auto-apply seed data on fresh databases so users who skip the wizard
still get shops, events, and gacha
- Fix stale docs referencing non-existent init/setup.sh and
schemas/patch-schema/ in docker/README, CONTRIBUTING, and README
This commit is contained in:
@@ -26,6 +26,7 @@ type FinishRequest struct {
|
||||
DBPassword string `json:"dbPassword"`
|
||||
DBName string `json:"dbName"`
|
||||
Host string `json:"host"`
|
||||
Language string `json:"language"`
|
||||
ClientMode string `json:"clientMode"`
|
||||
AutoCreateAccount bool `json:"autoCreateAccount"`
|
||||
}
|
||||
@@ -33,8 +34,13 @@ type FinishRequest struct {
|
||||
// buildDefaultConfig produces a minimal config map with only user-provided values.
|
||||
// All other settings are filled by Viper's registered defaults at load time.
|
||||
func buildDefaultConfig(req FinishRequest) map[string]interface{} {
|
||||
lang := req.Language
|
||||
if lang == "" {
|
||||
lang = "jp"
|
||||
}
|
||||
return map[string]interface{}{
|
||||
"Host": req.Host,
|
||||
"Language": lang,
|
||||
"ClientMode": req.ClientMode,
|
||||
"AutoCreateAccount": req.AutoCreateAccount,
|
||||
"Database": map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user