Commit 80b24733 authored by Fabian Reimeier's avatar Fabian Reimeier
Browse files

dynamic routing

parent 9c297587
......@@ -92,7 +92,7 @@ $app->group('/data', function() use ($app) {
## If no barcode is given, redirect to catalog
if(!isset($barcode))
return $response->withRedirect(Config::get('urls')['catalog_url'], 303);
return $response->withRedirect($this->get('router')->pathFor('catalog'), 303);
## If barcode was not found in DB, return 404
if(!$databaseUtil->isInDB($barcode))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment