mirror of https://github.com/statping/statping
fix: fix failures' heatmap when connected to postgres
parent
c2cf13172b
commit
d5ad850507
|
@ -129,7 +129,7 @@ func CountFailures() uint64 {
|
|||
func (s *Service) TotalFailuresOnDate(ago time.Time) (uint64, error) {
|
||||
var count uint64
|
||||
date := ago.UTC().Format("2006-01-02 00:00:00")
|
||||
dateend := ago.UTC().Format("2006-01-02 23:59:59")
|
||||
dateend := ago.UTC().Format("2006-01-02") + " 23:59:59"
|
||||
rows := failuresDB().Where("service = ? AND created_at BETWEEN ? AND ?", s.Id, date, dateend).Not("method = 'checkin'")
|
||||
err := rows.Count(&count)
|
||||
return count, err.Error
|
||||
|
|
Loading…
Reference in New Issue