mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
feat(confg): reload on save and refactor logging (#275)
* feat(confg): reload on save * refactor(logging): rework
This commit is contained in:
parent
198528a474
commit
91b094f4f4
56 changed files with 995 additions and 873 deletions
|
@ -3,8 +3,6 @@ package http
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/autobrr/autobrr/internal/config"
|
||||
|
||||
"github.com/go-chi/chi"
|
||||
)
|
||||
|
||||
|
@ -39,14 +37,12 @@ func (h configHandler) Routes(r chi.Router) {
|
|||
func (h configHandler) getConfig(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
c := config.Config
|
||||
|
||||
conf := configJson{
|
||||
Host: c.Host,
|
||||
Port: c.Port,
|
||||
LogLevel: c.LogLevel,
|
||||
LogPath: c.LogPath,
|
||||
BaseURL: c.BaseURL,
|
||||
Host: h.server.config.Host,
|
||||
Port: h.server.config.Port,
|
||||
LogLevel: h.server.config.LogLevel,
|
||||
LogPath: h.server.config.LogPath,
|
||||
BaseURL: h.server.config.BaseURL,
|
||||
Version: h.server.version,
|
||||
Commit: h.server.commit,
|
||||
Date: h.server.date,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue