/**
  * @param HttpRequestInterface $request
  *
  * @return JsonResponse
  */
 public function handle(HttpRequestInterface $request)
 {
     $result = [];
     foreach ($this->meetupReader->getMeetups() as $meetup) {
         $result[] = ['identifier' => $meetup->getIdentifier()->getValue(), 'title' => $meetup->getTitle(), 'date' => $meetup->getDate()->format('Y-m-d H:i:s'), 'capacity' => $meetup->getCapacity(), 'free' => $meetup->getFree()];
     }
     return new JsonResponse(200, $result);
 }
 /**
  * @param HttpRequestInterface $request
  *
  * @return Rsvp
  */
 private function mapInputToRsvp(HttpRequestInterface $request)
 {
     return new Rsvp($this->memberReader->getMember(new Uuid($request->getParameter('member'))), $this->meetupReader->getMeetup(new Uuid($request->getParameter('meetup'))), $request->getParameter('rsvp'));
 }