From 77270cceab876a32ca0462a1620ffd3f09ec95db Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 20 Jun 2026 10:58:35 -0500 Subject: [PATCH] refactor: remove leftover src/ directory (source/ is canonical) --- src/Extension/MokoSuiteBackupWebServices.php | 98 -------------------- src/Extension/index.html | 1 - src/index.html | 1 - 3 files changed, 100 deletions(-) delete mode 100644 src/Extension/MokoSuiteBackupWebServices.php delete mode 100644 src/Extension/index.html delete mode 100644 src/index.html diff --git a/src/Extension/MokoSuiteBackupWebServices.php b/src/Extension/MokoSuiteBackupWebServices.php deleted file mode 100644 index b56c0d9..0000000 --- a/src/Extension/MokoSuiteBackupWebServices.php +++ /dev/null @@ -1,98 +0,0 @@ - - * @copyright Copyright (C) 2026 Moko Consulting. All rights reserved. - * @license GNU General Public License version 3 or later; see LICENSE - * - * REST API endpoints — wire-compatible with the mcp_mokosuitebackup MCP server. - * - * Akeeba-compatible routes: - * POST /api/index.php/v1/mokosuitebackup/backup — Start backup - * GET /api/index.php/v1/mokosuitebackup/backups — List records - * DELETE /api/index.php/v1/mokosuitebackup/backup/:id — Delete record - * GET /api/index.php/v1/mokosuitebackup/backup/:id/download — Download archive - * GET /api/index.php/v1/mokosuitebackup/profiles — List profiles - */ - -namespace Joomla\Plugin\WebServices\MokoSuiteBackup\Extension; - -defined('_JEXEC') or die; - -use Joomla\CMS\Plugin\CMSPlugin; -use Joomla\CMS\Router\ApiRouter; -use Joomla\Event\Event; -use Joomla\Event\SubscriberInterface; -use Joomla\Router\Route; - -final class MokoSuiteBackupWebServices extends CMSPlugin implements SubscriberInterface -{ - protected $autoloadLanguage = true; - - public static function getSubscribedEvents(): array - { - return [ - 'onBeforeApiRoute' => 'onBeforeApiRoute', - ]; - } - - public function onBeforeApiRoute(Event $event): void - { - /** @var ApiRouter $router */ - [$router] = array_values($event->getArguments()); - - $defaults = [ - 'component' => 'com_mokosuitebackup', - 'public' => false, - ]; - - // Standard CRUD for backup records - $router->createCRUDRoutes('v1/mokosuitebackup/backups', 'backups', $defaults); - - // Start a backup (POST) - $router->addRoute( - new Route( - ['POST'], - 'v1/mokosuitebackup/backup', - 'backups.backup', - [], - $defaults - ) - ); - - // Delete a backup (DELETE) - $router->addRoute( - new Route( - ['DELETE'], - 'v1/mokosuitebackup/backup/:id', - 'backups.delete', - ['id' => '(\d+)'], - $defaults - ) - ); - - // Download a backup archive (GET) - $router->addRoute( - new Route( - ['GET'], - 'v1/mokosuitebackup/backup/:id/download', - 'backups.download', - ['id' => '(\d+)'], - $defaults - ) - ); - - // List backup profiles (GET) - $router->addRoute( - new Route( - ['GET'], - 'v1/mokosuitebackup/profiles', - 'backups.profiles', - [], - $defaults - ) - ); - } -} diff --git a/src/Extension/index.html b/src/Extension/index.html deleted file mode 100644 index 2efb97f..0000000 --- a/src/Extension/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/index.html b/src/index.html deleted file mode 100644 index 2efb97f..0000000 --- a/src/index.html +++ /dev/null @@ -1 +0,0 @@ -