Chore: Remove context.TODO (#43458)
* Remove context.TODO() from services * Fix live test
This commit is contained in:
@@ -34,7 +34,7 @@ func (hs *HTTPServer) initAppPluginRoutes(r *web.Mux) {
|
||||
TLSHandshakeTimeout: 10 * time.Second,
|
||||
}
|
||||
|
||||
for _, plugin := range hs.pluginStore.Plugins(context.TODO(), plugins.App) {
|
||||
for _, plugin := range hs.pluginStore.Plugins(context.Background(), plugins.App) {
|
||||
for _, route := range plugin.Routes {
|
||||
url := util.JoinURLFragments("/api/plugin-proxy/"+plugin.ID, route.Path)
|
||||
handlers := make([]web.Handler, 0)
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user