GH21563: Add the request context and logger to all public methods in app/admin.go (#22898)

* migrate mlog

* fix linter issue
Этот коммит содержится в:
Sinan Sonmez (Chaush)
2023-04-13 10:51:11 +02:00
коммит произвёл GitHub
родитель 24774f51da
Коммит 35d3e3e91e
4 изменённых файлов: 24 добавлений и 24 удалений

Просмотреть файл

@@ -295,7 +295,7 @@ func databaseRecycle(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
c.App.RecycleDatabaseConnection()
c.App.RecycleDatabaseConnection(c.AppContext)
auditRec.Success()
ReturnStatusOK(w)
@@ -348,7 +348,7 @@ func queryLogs(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
logs, logerr := c.App.QueryLogs(c.Params.Page, c.Params.LogsPerPage, logFilter)
logs, logerr := c.App.QueryLogs(c.AppContext, c.Params.Page, c.Params.LogsPerPage, logFilter)
if logerr != nil {
c.Err = logerr
return
@@ -387,7 +387,7 @@ func getLogs(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
lines, appErr := c.App.GetLogs(c.Params.Page, c.Params.LogsPerPage)
lines, appErr := c.App.GetLogs(c.AppContext, c.Params.Page, c.Params.LogsPerPage)
if appErr != nil {
c.Err = appErr
return