rdv: add user calendar endpoint + add this calendar in the calendar

This commit is contained in:
nobohan
2021-08-18 23:16:52 +02:00
parent dbf72774c2
commit 7c4f976230
8 changed files with 105 additions and 23 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace Chill\CalendarBundle\Controller;
use Chill\MainBundle\CRUD\Controller\ApiController;
use Symfony\Component\HttpFoundation\Request;
class CalendarAPIController extends ApiController
{
protected function customizeQuery(string $action, Request $request, $qb): void
{
if ($request->query->has('main_user')) {
$qb->where('e.mainUser = :main_user')
->setParameter('main_user', $request->query->get('main_user'));
}
}
}