From 24a400e9ba83bcbfe6e65961e73e0d2cd2ee382f Mon Sep 17 00:00:00 2001 From: Thedro Neely Date: Fri, 19 Jun 2020 23:12:35 -0400 Subject: app/controllers/api: Add cache controller --- app/Routes.php | 4 ++-- app/controllers/api/cache.controller.php | 7 +++++++ app/controllers/api/thumbnails.controller.php | 3 +-- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 app/controllers/api/cache.controller.php (limited to 'app') diff --git a/app/Routes.php b/app/Routes.php index 05edf2f..3088e75 100644 --- a/app/Routes.php +++ b/app/Routes.php @@ -2,7 +2,6 @@ /** * Public routes */ - $router->get('', '../app/controllers/index.controller.php'); $router->get('contact', '../app/controllers/contact.controller.php'); @@ -25,5 +24,6 @@ $router->post('contact', '../app/controllers/contact.controller.php'); /** * Api routes */ - $router->post('api/v1/thumbnails', '../app/controllers/api/thumbnails.controller.php'); + +$router->post('api/v1/cache', '../app/controllers/api/cache.controller.php'); 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 @@ +' . $updateTumbnails . ''; + echo $updateTumbnails = shell_exec('../bootstrap/helpers/update-thumbnails'); } -- cgit v1.2.3