aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-03-04 15:52:55 -0600
committerColin Okay <okay@toyful.space>2022-03-04 15:52:55 -0600
commit3dc20a35736e42c516fcf27e05e1cc3429ff0d85 (patch)
tree107cf60c5d35030da0af4da7bb312a00c0dc8034
parentc26b4bb528cef05b23898d2bf7fcbfb7efb35a29 (diff)
added admin only snapshot endpoint
-rw-r--r--src/main.lisp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.lisp b/src/main.lisp
index 6dc2c7b..b0031e8 100644
--- a/src/main.lisp
+++ b/src/main.lisp
@@ -606,6 +606,12 @@ mentioned in th config file.
;;; ENDPOINT DEFINITIONS
+(defendpoint* :post "/snapshot" ((token an-api-token))
+ (:auth 'admin-only)
+ "Snapshot the datastore. Do this after upgrade"
+ (db:snapshot)
+ "ok")
+
(defendpoint* :get "/contributor/:who a-contributor-by-handle:" () ()
"Return a [contributor](#contributor) data object."
(to-json who))