Fix #10973. AnalyticsUserCountsWithPostsByDay is sync now (#11012)

* Fix #10975. AnalyticsUserCountsWithPostsByDay is sync now

* revert modifications to go.mod and go.sum

* removed unnecessary else sentence

* Querys identation
Этот коммит содержится в:
Rodrigo Villablanca Vásquez
2019-06-11 15:06:40 -04:00
коммит произвёл Jesús Espino
родитель 969c032a1e
Коммит 28cf642ccb
5 изменённых файлов: 55 добавлений и 53 удалений

Просмотреть файл

@@ -171,11 +171,7 @@ func (a *App) GetAnalytics(name string, teamId string) (model.AnalyticsRows, *mo
return rows, nil
}
r := <-a.Srv.Store.Post().AnalyticsUserCountsWithPostsByDay(teamId)
if r.Err != nil {
return nil, r.Err
}
return r.Data.(model.AnalyticsRows), nil
return a.Srv.Store.Post().AnalyticsUserCountsWithPostsByDay(teamId)
} else if name == "extra_counts" {
var rows model.AnalyticsRows = make([]*model.AnalyticsRow, 6)
rows[0] = &model.AnalyticsRow{Name: "file_post_count", Value: 0}