Fix #10972. AnalyticsPostCountsByDay is sync now (#11013)

* Fix #10972. AnalyticsPostCountsByDay is sync now

* Revert go.mod and go.sum modifications

* Fix identation in querys

* Fix unnecessary else
Этот коммит содержится в:
Rodrigo Villablanca Vásquez
2019-06-11 15:24:53 -04:00
коммит произвёл Jesús Espino
родитель 803ce61ef8
Коммит b757e7d129
5 изменённых файлов: 57 добавлений и 55 удалений

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

@@ -160,11 +160,7 @@ func (a *App) GetAnalytics(name string, teamId string) (model.AnalyticsRows, *mo
return rows, nil
}
r := <-a.Srv.Store.Post().AnalyticsPostCountsByDay(teamId)
if r.Err != nil {
return nil, r.Err
}
return r.Data.(model.AnalyticsRows), nil
return a.Srv.Store.Post().AnalyticsPostCountsByDay(teamId)
} else if name == "user_counts_with_posts_day" {
if skipIntensiveQueries {
rows := model.AnalyticsRows{&model.AnalyticsRow{Name: "", Value: -1}}