Local-first runtime cleanup and recovery hardening
This commit is contained in:
@@ -14,7 +14,6 @@ import (
|
||||
type Config struct {
|
||||
Server ServerConfig `yaml:"server"`
|
||||
Database DatabaseConfig `yaml:"database"`
|
||||
Auth AuthConfig `yaml:"auth"`
|
||||
Pricing PricingConfig `yaml:"pricing"`
|
||||
Export ExportConfig `yaml:"export"`
|
||||
Alerts AlertsConfig `yaml:"alerts"`
|
||||
@@ -57,12 +56,6 @@ func (d *DatabaseConfig) DSN() string {
|
||||
return cfg.FormatDSN()
|
||||
}
|
||||
|
||||
type AuthConfig struct {
|
||||
JWTSecret string `yaml:"jwt_secret"`
|
||||
TokenExpiry time.Duration `yaml:"token_expiry"`
|
||||
RefreshExpiry time.Duration `yaml:"refresh_expiry"`
|
||||
}
|
||||
|
||||
type PricingConfig struct {
|
||||
DefaultMethod string `yaml:"default_method"`
|
||||
DefaultPeriodDays int `yaml:"default_period_days"`
|
||||
@@ -152,13 +145,6 @@ func (c *Config) setDefaults() {
|
||||
c.Database.ConnMaxLifetime = 5 * time.Minute
|
||||
}
|
||||
|
||||
if c.Auth.TokenExpiry == 0 {
|
||||
c.Auth.TokenExpiry = 24 * time.Hour
|
||||
}
|
||||
if c.Auth.RefreshExpiry == 0 {
|
||||
c.Auth.RefreshExpiry = 7 * 24 * time.Hour
|
||||
}
|
||||
|
||||
if c.Pricing.DefaultMethod == "" {
|
||||
c.Pricing.DefaultMethod = "weighted_median"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user