Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function getCardAction($card_code, Request $request)

$card = $this->getDoctrine()->getRepository(Card::class)->findOneBy(array("code" => $card_code));
if (!$card instanceof CardInterface) {
return $this->createNotFoundException();
throw $this->createNotFoundException();
}

// check the last-modified-since header
Expand Down Expand Up @@ -315,7 +315,7 @@ public function listCardsByPackAction($pack_code, Request $request)

$pack = $this->getDoctrine()->getRepository(Pack::class)->findOneBy(array('code' => $pack_code));
if (!$pack instanceof PackInterface) {
return $this->createNotFoundException();
throw $this->createNotFoundException();
}

$conditions = $this->get(CardsData::class)->syntax("e:$pack_code");
Expand Down Expand Up @@ -402,7 +402,7 @@ public function getDecklistAction($decklist_id, Request $request)
/* @var DecklistInterface $decklist */
$decklist = $this->getDoctrine()->getRepository(Decklist::class)->find($decklist_id);
if (!$decklist instanceof Decklist) {
return $this->createNotFoundException();
throw $this->createNotFoundException();
}

$response->setLastModified($decklist->getDateUpdate());
Expand Down