From d29fc1c3399d620d0e71e25f87065cf4f1d9c282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 28 May 2023 03:43:26 +0200 Subject: [PATCH] RVRNEXT-11 add new endpoints for events --- web.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/web.php b/web.php index 81aac81..3ad14df 100644 --- a/web.php +++ b/web.php @@ -13,6 +13,7 @@ use RVR\Controller\UserController; use RVR\Controller\UserSearchController; use RVR\Controller\CommunityController; use RVR\Controller\TransactionController; +use RVR\Controller\EventController; use RVR\Repository\UserRepository; require 'app.php'; @@ -91,6 +92,18 @@ Container::$routeCollection->group('communities', function (RouteCollection $rou $routeCollection->post('community.transactions.edit-action', '{transactionId}', [TransactionController::class, 'saveTransaction']); $routeCollection->post('community.transactions.delete-action', '{transactionId}/delete', [TransactionController::class, 'deleteTransaction']); }); + $routeCollection->group('events', function (RouteCollection $routeCollection) { + $routeCollection->get('community.events', '', [EventController::class, 'getEvents']); + $routeCollection->get('community.events.new', 'new', [EventController::class, 'getEventEdit']); + $routeCollection->post('community.events.new-action', 'new', [EventController::class, 'saveEvent']); + $routeCollection->get('community.events.search', 'search', [EventController::class, 'searchEvent']); + $routeCollection->group('{eventSlug}', function (RouteCollection $routeCollection) { + $routeCollection->get('community.event', '', [EventController::class, 'getEvent']); + $routeCollection->get('community.event.edit', 'edit', [EventController::class, 'getEventEdit']); + $routeCollection->post('community.event.edit-action', 'edit', [EventController::class, 'saveEvent']); + $routeCollection->post('community.event.delete-action', 'delete', [EventController::class, 'deleteEvent']); + }); + }); }); });