mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
fix: respect errors thrown in misc functions
This commit is contained in:
parent
74390bfccf
commit
1a6ee55d14
@ -268,16 +268,25 @@ func (srv *MiscService) sendSubscriptionNotificationScheduled(user *models.User,
|
||||
}
|
||||
|
||||
func (srv *MiscService) existsUsersTotalTime() bool {
|
||||
results, _ := srv.keyValueService.GetByPrefix(config.KeyLatestTotalTime)
|
||||
results, err := srv.keyValueService.GetByPrefix(config.KeyLatestTotalTime)
|
||||
if err != nil {
|
||||
config.Log().Error("failed to fetch latest time key-values, %v", err)
|
||||
}
|
||||
return len(results) > 0
|
||||
}
|
||||
|
||||
func (srv *MiscService) existsUsersFirstData() bool {
|
||||
results, _ := srv.keyValueService.GetByPrefix(config.KeyFirstHeartbeat)
|
||||
results, err := srv.keyValueService.GetByPrefix(config.KeyFirstHeartbeat)
|
||||
if err != nil {
|
||||
config.Log().Error("failed to fetch first heartbeats key-values, %v", err)
|
||||
}
|
||||
return len(results) > 0
|
||||
}
|
||||
|
||||
func (srv *MiscService) existsSubscriptionNotifications() bool {
|
||||
results, _ := srv.keyValueService.GetByPrefix(config.KeySubscriptionNotificationSent)
|
||||
results, err := srv.keyValueService.GetByPrefix(config.KeySubscriptionNotificationSent)
|
||||
if err != nil {
|
||||
config.Log().Error("failed to fetch notifications key-values, %v", err)
|
||||
}
|
||||
return len(results) > 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user