Config UI: Add backup & restore (BC) (#22071)
Co-authored-by: Michael Geers <michael@geers.tv>
This commit is contained in:
parent
7ce12d1e08
commit
ea64f76202
19 changed files with 1068 additions and 45 deletions
|
|
@ -345,9 +345,12 @@ func (s *HTTPd) RegisterSystemHandler(site *core.Site, valueChan chan<- util.Par
|
|||
|
||||
// system api
|
||||
routes := map[string]route{
|
||||
"log": {"GET", "/log", logHandler},
|
||||
"logareas": {"GET", "/log/areas", logAreasHandler},
|
||||
"reset": {"POST", "/reset", resetHandler},
|
||||
"log": {"GET", "/log", logHandler},
|
||||
"logareas": {"GET", "/log/areas", logAreasHandler},
|
||||
"clearcache": {"DELETE", "/cache", clearCacheHandler},
|
||||
"backup": {"POST", "/backup", getBackup(auth)},
|
||||
"restore": {"POST", "/restore", restoreDatabase(auth, shutdown)},
|
||||
"reset": {"POST", "/reset", resetDatabase(auth, shutdown)},
|
||||
"shutdown": {"POST", "/shutdown", func(w http.ResponseWriter, r *http.Request) {
|
||||
shutdown()
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue