mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-15 21:55:09 +08:00
feat(ui): show env mode persistence status and document writeback
This commit is contained in:
@@ -267,6 +267,22 @@ func (s *Store) IsEnvBacked() bool {
|
||||
return s.fromEnv
|
||||
}
|
||||
|
||||
func (s *Store) IsEnvWritebackEnabled() bool {
|
||||
return envWritebackEnabled()
|
||||
}
|
||||
|
||||
func (s *Store) HasEnvConfigSource() bool {
|
||||
rawCfg := strings.TrimSpace(os.Getenv("DS2API_CONFIG_JSON"))
|
||||
if rawCfg == "" {
|
||||
rawCfg = strings.TrimSpace(os.Getenv("CONFIG_JSON"))
|
||||
}
|
||||
return rawCfg != ""
|
||||
}
|
||||
|
||||
func (s *Store) ConfigPath() string {
|
||||
return s.path
|
||||
}
|
||||
|
||||
func (s *Store) SetVercelSync(hash string, ts int64) error {
|
||||
return s.Update(func(c *Config) error {
|
||||
c.VercelSyncHash = hash
|
||||
|
||||
Reference in New Issue
Block a user