Этот коммит содержится в:
Chris
2017-09-19 18:31:35 -05:00
коммит произвёл GitHub
родитель 7e4ff6adcc
Коммит ac74066f0e
43 изменённых файлов: 259 добавлений и 262 удалений

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

@@ -94,7 +94,7 @@ func getConfig(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
cfg := app.GetConfig()
cfg := c.App.GetConfig()
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
w.Write([]byte(cfg.ToJson()))
@@ -106,7 +106,7 @@ func configReload(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
app.ReloadConfig()
c.App.ReloadConfig()
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
ReturnStatusOK(w)
@@ -124,7 +124,7 @@ func updateConfig(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
err := app.SaveConfig(cfg, true)
err := c.App.SaveConfig(cfg, true)
if err != nil {
c.Err = err
return
@@ -132,7 +132,7 @@ func updateConfig(c *Context, w http.ResponseWriter, r *http.Request) {
c.LogAudit("updateConfig")
cfg = app.GetConfig()
cfg = c.App.GetConfig()
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
w.Write([]byte(cfg.ToJson()))
@@ -188,7 +188,7 @@ func getLogs(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
lines, err := app.GetLogs(c.Params.Page, c.Params.PerPage)
lines, err := c.App.GetLogs(c.Params.Page, c.Params.PerPage)
if err != nil {
c.Err = err
return