/**
  * @Route("/{code}", name="short_url")
  */
 public function indexAction(Request $request, $code)
 {
     $shortCode = $this->get('short_url')->get($code);
     if ($shortCode) {
         $response = new RedirectResponse($shortCode->getUrl(), RedirectResponse::HTTP_FOUND);
         $response->setPublic();
         $response->setExpires(new DateTime('+1 year'));
         return $response;
     }
     $response = new Response();
     $response->setPublic();
     $response->setExpires(new DateTime('+1 hour'));
     return $this->render('notFound.html.twig', ['code' => $code], $response);
 }