refactor: remove leftover src/ directory #52

Merged
jmiller merged 1 commits from fix/remove-old-src-v2 into main 2026-06-20 16:00:24 +00:00
3 changed files with 0 additions and 100 deletions
@@ -1,98 +0,0 @@
<?php
/**
* @package MokoSuiteBackup
* @subpackage plg_webservices_mokosuitebackup
* @author Moko Consulting <hello@mokoconsulting.tech>
* @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
)
);
}
}
-1
View File
@@ -1 +0,0 @@
<!DOCTYPE html><title></title>
-1
View File
@@ -1 +0,0 @@
<!DOCTYPE html><title></title>