fix: fix failures' heatmap when connected to postgres

pull/208/head
Naramsim 2019-06-14 15:12:07 +02:00
parent c2cf13172b
commit d5ad850507
1 changed files with 1 additions and 1 deletions

View File

@ -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