From 085161fbc3451f90f991a0731fbaf0931cb07678 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 7 May 2015 14:16:13 +0300 Subject: Validation exception; user/login endpoint --- src/routes.php | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'src/routes.php') diff --git a/src/routes.php b/src/routes.php index 4e7aa9d..9b3266b 100644 --- a/src/routes.php +++ b/src/routes.php @@ -1,35 +1,14 @@ 'v1', 'protected' => false], function () { - - Route::resource('bot', 'CamilStaps\BotleaguesApi\BotController', - ['only' => ['index','show']]); - - Route::resource('competition', 'CamilStaps\BotleaguesApi\CompetitionController', - ['only' => ['index','show']]); - - Route::resource('competition_type', 'CamilStaps\BotleaguesApi\CompetitionTypeController', - ['only' => ['index','show']]); - - Route::resource('game', 'CamilStaps\BotleaguesApi\GameController', - ['only' => ['index','show']]); - - Route::resource('participant', 'CamilStaps\BotleaguesApi\ParticipantController', - ['only' => ['index','show']]); - - Route::resource('user', 'CamilStaps\BotleaguesApi\UserController', - ['only' => ['index','show','store']]); - - }); - Route::api(['version' => 'v1', 'protected' => true, 'providers' => 'basic'], function () { Route::resource('bot', 'CamilStaps\BotleaguesApi\BotController', ['except' => ['index', 'show', 'create','edit']]); - + Route::resource('user', 'CamilStaps\BotleaguesApi\UserController', ['except' => ['index', 'show', 'create','edit','store']]); + Route::get('user/login', 'CamilStaps\BotleaguesApi\UserController@login'); Route::group(array('before' => 'administrator'), function() { @@ -46,4 +25,26 @@ Route::group(array('https'), function() { }); + Route::api(['version' => 'v1', 'protected' => false], function () { + + Route::resource('bot', 'CamilStaps\BotleaguesApi\BotController', + ['only' => ['index','show']]); + + Route::resource('competition', 'CamilStaps\BotleaguesApi\CompetitionController', + ['only' => ['index','show']]); + + Route::resource('competition_type', 'CamilStaps\BotleaguesApi\CompetitionTypeController', + ['only' => ['index','show']]); + + Route::resource('game', 'CamilStaps\BotleaguesApi\GameController', + ['only' => ['index','show']]); + + Route::resource('participant', 'CamilStaps\BotleaguesApi\ParticipantController', + ['only' => ['index','show']]); + + Route::resource('user', 'CamilStaps\BotleaguesApi\UserController', + ['only' => ['index','show','store']]); + + }); + }); \ No newline at end of file -- cgit v1.2.3