Add auth to backup command

This commit is contained in:
stremovsky
2019-12-26 22:51:54 +02:00
parent 9f450a6d8f
commit 20f3fe8dac

View File

@@ -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) {
if e.enforceAuth(w, r, nil) == false {
return
}
w.WriteHeader(200)
e.db.backupDB(w)
}