diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-06-26 16:33:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-26 16:33:41 -0700 |
commit | 08bab226d6b998eb5cf87e4be1db45e89fb9f772 (patch) | |
tree | aba0be8dbd8c0ed630439a302fffcf5c078eeb21 /system/admin/handlers.go | |
parent | cd6be5ebe16f3ee815e12d3022dfb79e4163d867 (diff) | |
parent | 0a1d7d9cd8ad1ac01c8fcd4d3b4fef57cffd4cb0 (diff) |
Merge pull request #168 from tom-f/ponzu-dev
Add backup routine to search
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 0700003..c70dd86 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) } |