Chore: Add context to star and stats (#39591)

* Add context to star and stats

* Use WithTransactionalDbSession

* Add additional ctx

* Remove convey

* Fix star handler name

* Use WithDbSession, use DispatchCtx

* Remove xorm from star
This commit is contained in:
idafurjes
2021-09-28 17:54:45 +02:00
committed by GitHub
parent 580cdc46fc
commit b255c1b992
11 changed files with 71 additions and 67 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ func (hs *HTTPServer) AdminGetSettings(c *models.ReqContext) response.Response {
func AdminGetStats(c *models.ReqContext) response.Response {
statsQuery := models.GetAdminStatsQuery{}
if err := bus.Dispatch(&statsQuery); err != nil {
if err := bus.DispatchCtx(c.Req.Context(), &statsQuery); err != nil {
return response.Error(500, "Failed to get admin stats from database", err)
}