From e266bc6c1f4da27b5291d63330b6fd08e61c269b Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 29 May 2019 23:52:08 +0300 Subject: [PATCH] Slim Framework integration #118 #117 - Snippets: fixes and refactoring --- site/plugins/admin/routes.php | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/site/plugins/admin/routes.php b/site/plugins/admin/routes.php index 307e5ba5..09e6b432 100644 --- a/site/plugins/admin/routes.php +++ b/site/plugins/admin/routes.php @@ -12,7 +12,7 @@ $app->post('/admin/settings/clear-cache', 'SettingsController:clearCache')->setN // Plugins Controller $app->get('/admin/plugins', 'PluginsController:index')->setName('admin.plugins.index'); -$app->post('/admin/plugins/change-status', 'PluginsController:changeStatus')->setName('admin.plugins.change-status'); +$app->post('/admin/plugins/update-status', 'PluginsController:pluginStatusProcess')->setName('admin.plugins.update-status'); // EntriesController $app->get('/admin/entries', 'EntriesController:index')->setName('admin.entries.index'); @@ -33,11 +33,11 @@ $app->get('/admin/fieldsets', 'FieldsetsController:index')->setName('admin.field $app->get('/admin/fieldsets/add', 'FieldsetsController:add')->setName('admin.fieldsets.add'); $app->post('/admin/fieldsets/add', 'FieldsetsController:addProcess')->setName('admin.fieldsets.addProcess'); $app->get('/admin/fieldsets/edit', 'FieldsetsController:edit')->setName('admin.fieldsets.edit'); -$app->post('/admin/fieldsets/edit', 'FieldsetsController:editProcess')->setName('admin.fieldsets.addProcess'); +$app->post('/admin/fieldsets/edit', 'FieldsetsController:editProcess')->setName('admin.fieldsets.editProcess'); $app->get('/admin/fieldsets/rename', 'FieldsetsController:rename')->setName('admin.fieldsets.rename'); $app->post('/admin/fieldsets/rename', 'FieldsetsController:renameProcess')->setName('admin.fieldsets.renameProcess'); -$app->get('/admin/fieldsets/duplicate', 'FieldsetsController:duplicateProcess')->setName('admin.fieldsets.duplicateProcess'); -$app->get('/admin/fieldsets/delete', 'FieldsetsController:deleteProcess')->setName('admin.fieldsets.deleteProcess'); +$app->post('/admin/fieldsets/duplicate', 'FieldsetsController:duplicateProcess')->setName('admin.fieldsets.duplicateProcess'); +$app->post('/admin/fieldsets/delete', 'FieldsetsController:deleteProcess')->setName('admin.fieldsets.deleteProcess'); // TemplatesController $app->get('/admin/templates', 'TemplatesController:index')->setName('admin.templates.index'); @@ -47,16 +47,20 @@ $app->get('/admin/templates/edit', 'TemplatesController:edit')->setName('admin.t $app->post('/admin/templates/edit', 'TemplatesController:editProcess')->setName('admin.templates.addProcess'); $app->get('/admin/templates/rename', 'TemplatesController:rename')->setName('admin.templates.rename'); $app->post('/admin/templates/rename', 'TemplatesController:renameProcess')->setName('admin.templates.renameProcess'); -$app->get('/admin/templates/duplicate', 'TemplatesController:duplicateProcess')->setName('admin.templates.duplicateProcess'); -$app->get('/admin/templates/delete', 'TemplatesController:deleteProcess')->setName('admin.templates.deleteProcess'); +$app->post('/admin/templates/duplicate', 'TemplatesController:duplicateProcess')->setName('admin.templates.duplicateProcess'); +$app->post('/admin/templates/delete', 'TemplatesController:deleteProcess')->setName('admin.templates.deleteProcess'); // SnippetsController -$app->get('/admin/snippets', 'SnippetsController:index')->setName('admin.templates.index'); -$app->get('/admin/snippets/add', 'SnippetsController:add')->setName('admin.templates.add'); -$app->post('/admin/snippets/add', 'SnippetsController:addProcess')->setName('admin.templates.addProcess'); -$app->get('/admin/snippets/edit', 'SnippetsController:edit')->setName('admin.templates.edit'); -$app->post('/admin/snippets/edit', 'SnippetsController:editProcess')->setName('admin.templates.addProcess'); -$app->get('/admin/snippets/rename', 'SnippetsController:rename')->setName('admin.templates.rename'); -$app->post('/admin/snippets/rename', 'SnippetsController:renameProcess')->setName('admin.templates.renameProcess'); -$app->get('/admin/snippets/duplicate', 'SnippetsController:duplicateProcess')->setName('admin.templates.duplicateProcess'); -$app->get('/admin/snippets/delete', 'SnippetsController:deleteProcess')->setName('admin.templates.deleteProcess'); +$app->get('/admin/snippets', 'SnippetsController:index')->setName('admin.snippets.index'); +$app->get('/admin/snippets/add', 'SnippetsController:add')->setName('admin.snippets.add'); +$app->post('/admin/snippets/add', 'SnippetsController:addProcess')->setName('admin.snippets.addProcess'); +$app->get('/admin/snippets/edit', 'SnippetsController:edit')->setName('admin.snippets.edit'); +$app->post('/admin/snippets/edit', 'SnippetsController:editProcess')->setName('admin.snippets.addProcess'); +$app->get('/admin/snippets/rename', 'SnippetsController:rename')->setName('admin.snippets.rename'); +$app->post('/admin/snippets/rename', 'SnippetsController:renameProcess')->setName('admin.snippets.renameProcess'); +$app->post('/admin/snippets/duplicate', 'SnippetsController:duplicateProcess')->setName('admin.snippets.duplicateProcess'); +$app->post('/admin/snippets/delete', 'SnippetsController:deleteProcess')->setName('admin.snippets.deleteProcess'); + +// UsersController +$app->get('/admin/registration', 'UsersController:registration')->setName('admin.users.registration'); +$app->get('/admin/registrationProcess', 'UsersController:registrationProcess')->setName('admin.users.registrationProcess');