Chore: Propagate context for preferences (#41167)

Ref #36734
This commit is contained in:
Marcus Efraimsson
2021-11-02 13:41:45 +01:00
committed by GitHub
parent ad888813c6
commit 1a89d97fed
6 changed files with 61 additions and 58 deletions
+2 -2
View File
@@ -155,7 +155,7 @@ func (hs *HTTPServer) GetTeamPreferences(c *models.ReqContext) response.Response
return response.Error(403, "Not allowed to view team preferences.", err)
}
return getPreferencesFor(orgId, 0, teamId)
return hs.getPreferencesFor(c.Req.Context(), orgId, 0, teamId)
}
// PUT /api/teams/:teamId/preferences
@@ -167,7 +167,7 @@ func (hs *HTTPServer) UpdateTeamPreferences(c *models.ReqContext, dtoCmd dtos.Up
return response.Error(403, "Not allowed to update team preferences.", err)
}
return updatePreferencesFor(orgId, 0, teamId, &dtoCmd)
return hs.updatePreferencesFor(c.Req.Context(), orgId, 0, teamId, &dtoCmd)
}
// createTeam creates a team.