[MM 55591] - Add Request Context and logger to all public methods in server/channels/app/analytics.go (#26331)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1c846d8341
Коммит
33977e1702
@@ -463,7 +463,7 @@ func getAnalytics(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
rows, appErr := c.App.GetAnalytics(name, teamId)
|
||||
rows, appErr := c.App.GetAnalytics(c.AppContext, name, teamId)
|
||||
if appErr != nil {
|
||||
c.Err = appErr
|
||||
return
|
||||
|
||||
@@ -851,9 +851,9 @@ func getUsers(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
if sort == "last_activity_at" {
|
||||
profiles, appErr = c.App.GetRecentlyActiveUsersForTeamPage(inTeamId, c.Params.Page, c.Params.PerPage, c.IsSystemAdmin(), restrictions)
|
||||
profiles, appErr = c.App.GetRecentlyActiveUsersForTeamPage(c.AppContext, inTeamId, c.Params.Page, c.Params.PerPage, c.IsSystemAdmin(), restrictions)
|
||||
} else if sort == "create_at" {
|
||||
profiles, appErr = c.App.GetNewUsersForTeamPage(inTeamId, c.Params.Page, c.Params.PerPage, c.IsSystemAdmin(), restrictions)
|
||||
profiles, appErr = c.App.GetNewUsersForTeamPage(c.AppContext, inTeamId, c.Params.Page, c.Params.PerPage, c.IsSystemAdmin(), restrictions)
|
||||
} else {
|
||||
etag = c.App.GetUsersInTeamEtag(inTeamId, restrictions.Hash())
|
||||
if c.HandleEtag(etag, "Get Users in Team", w, r) {
|
||||
|
||||
@@ -194,9 +194,9 @@ func localGetUsers(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
profiles, appErr = c.App.GetUsersNotInTeamPage(notInTeamId, groupConstrainedBool, c.Params.Page, c.Params.PerPage, c.IsSystemAdmin(), nil)
|
||||
} else if inTeamId != "" {
|
||||
if sort == "last_activity_at" {
|
||||
profiles, appErr = c.App.GetRecentlyActiveUsersForTeamPage(inTeamId, c.Params.Page, c.Params.PerPage, c.IsSystemAdmin(), nil)
|
||||
profiles, appErr = c.App.GetRecentlyActiveUsersForTeamPage(c.AppContext, c.Params.TeamId, c.Params.Page, c.Params.PerPage, c.IsSystemAdmin(), nil)
|
||||
} else if sort == "create_at" {
|
||||
profiles, appErr = c.App.GetNewUsersForTeamPage(inTeamId, c.Params.Page, c.Params.PerPage, c.IsSystemAdmin(), nil)
|
||||
profiles, appErr = c.App.GetNewUsersForTeamPage(c.AppContext, c.Params.TeamId, c.Params.Page, c.Params.PerPage, c.IsSystemAdmin(), nil)
|
||||
} else {
|
||||
etag = c.App.GetUsersInTeamEtag(inTeamId, "")
|
||||
if c.HandleEtag(etag, "Get Users in Team", w, r) {
|
||||
|
||||
Ссылка в новой задаче
Block a user