Chore: Remove context.TODO (#43458)

* Remove context.TODO() from services

* Fix live test
This commit is contained in:
idafurjes authored and GitHub committed 2021-12-28 10:26:18 +01:00
1 parent 56b3dc5445
commit 56c3875bb9
24 files changed
+81 -77

No files matched your search

+1 -1
View File
@@ -177,7 +177,7 @@ func (hs *HTTPServer) PostSyncUserWithLDAP(c *models.ReqContext) response.Respon
authModuleQuery := &models.GetAuthInfoQuery{UserId: query.Result.Id, AuthModule: models.AuthModuleLDAP}
if err := bus.DispatchCtx(context.TODO(), authModuleQuery); err != nil { // validate the userId comes from LDAP
if err := bus.DispatchCtx(c.Req.Context(), authModuleQuery); err != nil { // validate the userId comes from LDAP
if errors.Is(err, models.ErrUserNotFound) {
return response.Error(404, models.ErrUserNotFound.Error(), nil)
}