mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-11-03 03:17:45 +00:00
Add auth to backup command
This commit is contained in:
@@ -134,6 +134,9 @@ func (e mainEnv) index(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e mainEnv) backupDB(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
func (e mainEnv) backupDB(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||||
|
if e.enforceAuth(w, r, nil) == false {
|
||||||
|
return
|
||||||
|
}
|
||||||
w.WriteHeader(200)
|
w.WriteHeader(200)
|
||||||
e.db.backupDB(w)
|
e.db.backupDB(w)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user