Chore: Add context to temp user (#41284)

* Add context to temp user

* Remove xorm and InTransaction
This commit is contained in:
idafurjes
2021-11-04 11:17:07 +01:00
committed by GitHub
parent b82797d1b0
commit da5033f3fb
6 changed files with 84 additions and 73 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ func (s *OSSService) SearchUser(c *models.ReqContext) (*models.SearchUsersQuery,
}
query := &models.SearchUsersQuery{Query: searchQuery, Filters: filters, Page: page, Limit: perPage}
if err := s.bus.Dispatch(query); err != nil {
if err := s.bus.DispatchCtx(c.Req.Context(), query); err != nil {
return nil, err
}