aboutsummaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2020-06-19 23:12:35 -0400
committerThedro Neely <thedroneely@gmail.com>2020-06-19 23:42:38 -0400
commit24a400e9ba83bcbfe6e65961e73e0d2cd2ee382f (patch)
tree73cd5ed530fb1ee563689b8c7c69eeb1dfa15a72 /app/controllers
parent597f7d5bb024f09278df7da86676ae537337785a (diff)
downloadthedroneely.com-24a400e9ba83bcbfe6e65961e73e0d2cd2ee382f.tar.gz
thedroneely.com-24a400e9ba83bcbfe6e65961e73e0d2cd2ee382f.tar.bz2
thedroneely.com-24a400e9ba83bcbfe6e65961e73e0d2cd2ee382f.zip
app/controllers/api: Add cache controller
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/cache.controller.php7
-rw-r--r--app/controllers/api/thumbnails.controller.php3
2 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/api/cache.controller.php b/app/controllers/api/cache.controller.php
new file mode 100644
index 0000000..2286445
--- /dev/null
+++ b/app/controllers/api/cache.controller.php
@@ -0,0 +1,7 @@
+<?php
+/**
+ * Invalidate cache
+ */
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+ echo $cacheBust = shell_exec('../bootstrap/helpers/cache-bust');
+}
diff --git a/app/controllers/api/thumbnails.controller.php b/app/controllers/api/thumbnails.controller.php
index 5741a47..f2657c0 100644
--- a/app/controllers/api/thumbnails.controller.php
+++ b/app/controllers/api/thumbnails.controller.php
@@ -3,6 +3,5 @@
* Update Thumbnails
*/
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
- $updateTumbnails = shell_exec('../bootstrap/helpers/update-thumbnails');
- echo '<pre>' . $updateTumbnails . '</pre>';
+ echo $updateTumbnails = shell_exec('../bootstrap/helpers/update-thumbnails');
}