handle remote events 'isAllDay' and fix cs

This commit is contained in:
2022-06-29 15:29:22 +02:00
parent 849e7158e4
commit adad4313a6
8 changed files with 61 additions and 56 deletions

View File

@@ -192,31 +192,6 @@ class CalendarController extends AbstractController
]);
}
/**
* @Route("/{_locale}/calendar/calendar/my", name="chill_calendar_calendar_list_my")
*
* @param Request $request
* @return Response
*/
public function myCalendar(Request $request): Response
{
$this->denyAccessUnlessGranted('ROLE_USER');
if (!$this->remoteCalendarConnector->isReady()) {
return $this->remoteCalendarConnector->getMakeReadyResponse($request->getUri());
}
if (!$this->getUser() instanceof User) {
throw new UnauthorizedHttpException('you are not an user');
}
$view = '@ChillCalendar/Calendar/listByUser.html.twig';
return $this->render($view, [
'user' => $this->getUser(),
]);
}
/**
* Lists all Calendar entities.
*
@@ -247,6 +222,28 @@ class CalendarController extends AbstractController
]);
}
/**
* @Route("/{_locale}/calendar/calendar/my", name="chill_calendar_calendar_list_my")
*/
public function myCalendar(Request $request): Response
{
$this->denyAccessUnlessGranted('ROLE_USER');
if (!$this->remoteCalendarConnector->isReady()) {
return $this->remoteCalendarConnector->getMakeReadyResponse($request->getUri());
}
if (!$this->getUser() instanceof User) {
throw new UnauthorizedHttpException('you are not an user');
}
$view = '@ChillCalendar/Calendar/listByUser.html.twig';
return $this->render($view, [
'user' => $this->getUser(),
]);
}
/**
* Create a new calendar item.
*