Add backup database functionality (#1069)

This commit is contained in:
WithoutPants
2021-01-21 22:02:09 +11:00
committed by GitHub
parent 093b997eb1
commit 3b41894dbd
10 changed files with 137 additions and 12 deletions

View File

@@ -60,7 +60,7 @@ func doMigrateHandler(w http.ResponseWriter, r *http.Request) {
}
// perform database backup
if err = database.Backup(backupPath); err != nil {
if err = database.Backup(database.DB, backupPath); err != nil {
http.Error(w, fmt.Sprintf("error backing up database: %s", err), 500)
return
}