mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-14 15:20:59 +00:00
fix(warp): surface update-clock persistence failures (#6209)
Co-authored-by: n0ctal <293235942+n0ctal@users.noreply.github.com>
This commit is contained in:
@@ -391,11 +391,17 @@ func (s *SettingService) setInt(key string, value int) error {
|
||||
}
|
||||
|
||||
func (s *SettingService) GetWarpLastUpdate() (int64, error) {
|
||||
val, err := s.getString("warpLastUpdate")
|
||||
if err != nil || val == "" {
|
||||
setting, err := s.getSetting("warpLastUpdate")
|
||||
if database.IsNotFound(err) {
|
||||
return 0, nil
|
||||
}
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return strconv.ParseInt(val, 10, 64)
|
||||
if setting.Value == "" {
|
||||
return 0, nil
|
||||
}
|
||||
return strconv.ParseInt(setting.Value, 10, 64)
|
||||
}
|
||||
|
||||
func (s *SettingService) SetWarpLastUpdate(val int64) error {
|
||||
|
||||
Reference in New Issue
Block a user