aboutsummaryrefslogtreecommitdiff
path: root/src/routes.php
diff options
context:
space:
mode:
authorCamil Staps2015-05-07 14:16:13 +0300
committerCamil Staps2015-05-07 14:16:13 +0300
commit085161fbc3451f90f991a0731fbaf0931cb07678 (patch)
tree32f13ab154a687453b35c1787dbc92ee87bd96db /src/routes.php
parentValidate register input (diff)
Validation exception; user/login endpoint
Diffstat (limited to 'src/routes.php')
-rw-r--r--src/routes.php47
1 files changed, 24 insertions, 23 deletions
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 @@
<?php
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']]);
-
- });
-
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