RVRNEXT-11 add new endpoints for events

This commit is contained in:
Bence Pőcze 2023-05-28 03:43:26 +02:00
parent 63ca6e7557
commit 2fc5812eba
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D

13
web.php
View File

@ -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']);
});
});
});
});