aboutsummaryrefslogtreecommitdiffstats
path: root/app/static/scripts/purge.js
diff options
context:
space:
mode:
authorLMBishop <13875753+LMBishop@users.noreply.github.com>2021-11-20 17:46:20 +0000
committerLMBishop <13875753+LMBishop@users.noreply.github.com>2021-11-20 17:46:20 +0000
commitf4a3e9bf53c657c3e6b9330eb6ad644094f75e61 (patch)
tree4cde00e1c6116281a79a2f5b0f3746a9bfc367a5 /app/static/scripts/purge.js
Initial commit
Diffstat (limited to 'app/static/scripts/purge.js')
-rw-r--r--app/static/scripts/purge.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/static/scripts/purge.js b/app/static/scripts/purge.js
new file mode 100644
index 0000000..5ee34f0
--- /dev/null
+++ b/app/static/scripts/purge.js
@@ -0,0 +1,15 @@
+$(() => {
+ $('#confirm').click(() => {
+ let page = $('#confirm').data('page');
+ $.ajax({
+ type: 'GET',
+ url: `/special/purge/${page}/confirm`,
+ success: () => {
+ $('#response').html('<div class=\'box\'>Successfully purged page.</div>');
+ },
+ error: () => {
+ $('#response').html('<div class=\'box\'>Could not purge page. Try again later.</div>');
+ }
+ });
+ });
+});