diff options
Diffstat (limited to 'system/admin/handlers.go')
-rw-r--r-- | system/admin/handlers.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 3933d3d..aac9ec2 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -23,6 +23,7 @@ import ( "github.com/ponzu-cms/ponzu/system/api/analytics" "github.com/ponzu-cms/ponzu/system/db" "github.com/ponzu-cms/ponzu/system/item" + "github.com/ponzu-cms/ponzu/system/search" "github.com/gorilla/schema" emailer "github.com/nilslice/email" @@ -224,6 +225,14 @@ func backupHandler(res http.ResponseWriter, req *http.Request) { return } + case "search": + err := search.Backup(ctx, res) + if err != nil { + log.Println("Failed to run backup on search:", err) + res.WriteHeader(http.StatusInternalServerError) + return + } + default: res.WriteHeader(http.StatusBadRequest) } |