Files
backPRO/config/routes.php
Jacek Pyziak 4d5e220b3c Add BackPRO News theme and update database schema for article tracking
- Introduced a new WordPress theme "BackPRO News" with a lightweight magazine-style design.
- Added columns for tracking retry attempts and timestamps for unpublished/generated articles in the articles table.
- Included remote service metadata fields in the sites table for better management.
- Created log files for image replacements, installer actions, OpenAI article generation, and publishing processes.
- Implemented a dashboard template for site management, including permalink settings and theme installation options.
2026-02-17 20:08:02 +01:00

69 lines
3.3 KiB
PHP

<?php
/** @var \App\Core\Router $router */
// Auth
$router->get('/login', 'AuthController', 'loginForm');
$router->post('/login', 'AuthController', 'login');
$router->get('/logout', 'AuthController', 'logout');
$router->get('/change-password', 'AuthController', 'changePasswordForm');
$router->post('/change-password', 'AuthController', 'changePassword');
// Dashboard
$router->get('/', 'DashboardController', 'index');
// Global Topics (library)
$router->get('/global-topics', 'GlobalTopicController', 'index');
$router->post('/global-topics/categories', 'GlobalTopicController', 'storeCategory');
$router->post('/global-topics/{id}/subtopics', 'GlobalTopicController', 'storeSubtopic');
$router->post('/global-topics/{id}/update', 'GlobalTopicController', 'update');
$router->post('/global-topics/{id}/delete', 'GlobalTopicController', 'destroy');
// Sites
$router->get('/sites', 'SiteController', 'index');
$router->get('/sites/create', 'SiteController', 'create');
$router->post('/sites', 'SiteController', 'store');
$router->get('/sites/{id}/edit', 'SiteController', 'edit');
$router->post('/sites/{id}', 'SiteController', 'update');
$router->post('/sites/{id}/delete', 'SiteController', 'destroy');
$router->post('/sites/{id}/test', 'SiteController', 'testConnection');
$router->get('/sites/{id}/dashboard', 'SiteController', 'dashboard');
$router->post('/sites/{id}/dashboard/permalinks/enable', 'SiteController', 'enablePrettyPermalinks');
$router->post('/sites/{id}/dashboard/remote-service/update', 'SiteController', 'updateRemoteService');
$router->post('/sites/{id}/dashboard/theme/install', 'SiteController', 'installBackproNewsTheme');
$router->post('/sites/{id}/dashboard/reinstall', 'SiteController', 'reinstallWordPress');
// Topics
$router->get('/sites/{id}/topics', 'TopicController', 'index');
$router->post('/sites/{id}/topics', 'TopicController', 'store');
$router->post('/topics/{id}/update', 'TopicController', 'update');
$router->post('/topics/{id}/delete', 'TopicController', 'destroy');
// Categories (sync from WordPress)
$router->get('/sites/{id}/categories', 'CategoryController', 'index');
$router->post('/sites/{id}/categories/sync', 'CategoryController', 'sync');
$router->post('/sites/{id}/categories/create', 'CategoryController', 'create');
$router->post('/sites/{id}/categories/from-topics', 'CategoryController', 'createFromTopics');
// Articles
$router->get('/articles', 'ArticleController', 'index');
$router->post('/articles/import', 'ArticleController', 'importFromWordPress');
$router->get('/articles/{id}', 'ArticleController', 'show');
$router->post('/articles/{id}/delete', 'ArticleController', 'destroy');
$router->post('/articles/{id}/replace-image', 'ArticleController', 'replaceImage');
// Publish (manual trigger)
$router->post('/publish/run', 'PublishController', 'run');
$router->post('/publish/site/{id}', 'PublishController', 'runForSite');
$router->get('/publish/token-run', 'PublishController', 'runByToken');
$router->post('/publish/token-run', 'PublishController', 'runByToken');
// Installer (Remote WordPress Installation)
$router->get('/installer', 'InstallerController', 'index');
$router->post('/installer', 'InstallerController', 'install');
$router->get('/installer/status/{id}', 'InstallerController', 'status');
// Settings
$router->get('/settings', 'SettingsController', 'index');
$router->post('/settings', 'SettingsController', 'update');