From 07887627cc307620508d600640597adf7fa123b1 Mon Sep 17 00:00:00 2001 From: Thierry Degeling Date: Tue, 11 Aug 2015 12:45:26 +0200 Subject: [PATCH] added trailing slashes to the routes --- src/app/level2/EventsControllerProvider.php | 6 +++--- src/app/level2/Level2ControllerProvider.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/level2/EventsControllerProvider.php b/src/app/level2/EventsControllerProvider.php index 5ec9cb6..367e9c9 100644 --- a/src/app/level2/EventsControllerProvider.php +++ b/src/app/level2/EventsControllerProvider.php @@ -28,7 +28,7 @@ }); - $ctr->get('/{year}/{month}', function( $year, $month ) use ( $app ) { + $ctr->get('/{year}/{month}/', function( $year, $month ) use ( $app ) { if ( strpos( $month, '.' ) !== false ) { @@ -65,7 +65,7 @@ }); - $ctr->get('/{year}/{month}/{day}', function( $year, $month, $day ) use ( $app ) { + $ctr->get('/{year}/{month}/{day}/', function( $year, $month, $day ) use ( $app ) { if ( strpos( $day, '.' ) !== false ) { @@ -104,7 +104,7 @@ }); - $ctr->get('/{parameter}', function( $parameter ) use ( $app ) { + $ctr->get('/{parameter}/', function( $parameter ) use ( $app ) { if ( $parameter == 'json' ) { diff --git a/src/app/level2/Level2ControllerProvider.php b/src/app/level2/Level2ControllerProvider.php index 96ab2e2..22a774d 100644 --- a/src/app/level2/Level2ControllerProvider.php +++ b/src/app/level2/Level2ControllerProvider.php @@ -28,7 +28,7 @@ }); - $ctr->get('/spaceapi', function( ) use ( $app ) { + $ctr->get('/spaceapi/', function( ) use ( $app ) { return $app->json( Helpers::spaceAPI( $app ) @@ -36,7 +36,7 @@ }); - $ctr->get('/openingTimes', function( ) use ( $app ) { + $ctr->get('/openingTimes/', function( ) use ( $app ) { return $app['twig']->render( 'openingTimes.twig', @@ -49,7 +49,7 @@ }); - $ctr->get('/scrape', function() use ( $app ) { + $ctr->get('/scrape/', function() use ( $app ) { Helpers::saveFile ( json_encode( Level2::getJSONCalendar( $app ) ) , $app[ 'cache' ][ 'calendar' ][ 'json' ] ); Helpers::saveFile ( file_get_contents( $app[ 'google' ][ 'ical' ] ) , $app[ 'cache' ][ 'calendar' ][ 'ical' ] );