aboutsummaryrefslogtreecommitdiff
path: root/src/routes.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes.php')
-rw-r--r--src/routes.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/routes.php b/src/routes.php
index ac9bc31..1ac35ab 100644
--- a/src/routes.php
+++ b/src/routes.php
@@ -1,9 +1,14 @@
<?php
Route::get('users', ['before' => 'auth.basic', function(){
- return 'hello world';
+ return 'hello world';
}]);
-Route::api(['version' => 'v1'], function () {
- Route::resource('bot', 'CamilStaps\BotleaguesApi\BotController');
- Route::resource('user', 'CamilStaps\BotleaguesApi\UserController');
-}); \ No newline at end of file
+Route::api(['version' => 'v1', 'protected' => true, 'providers' => 'basic'], function () {
+ Route::resource('bot', 'CamilStaps\BotleaguesApi\BotController');
+ Route::resource('user', 'CamilStaps\BotleaguesApi\UserController');
+});
+
+Route::when('bot', 'botleaguesapi-http-auth');
+Route::when('bot/*', 'botleaguesapi-http-auth');
+Route::when('user', 'botleaguesapi-http-auth');
+Route::when('user/*', 'botleaguesapi-http-auth'); \ No newline at end of file