1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-23 19:02:46 +01:00

Remove api routes

This commit is contained in:
FreeScout 2020-10-06 00:27:32 -07:00
parent a5c9a8cea6
commit e237f76b0f
5 changed files with 17 additions and 35 deletions

1
.gitignore vendored
View File

@ -27,6 +27,7 @@ Thumbs.db
/Modules
/Modules/**/.git
/public/modules
/public/docs
/storage/.ignore_locales
/storage/.installed
/tools

View File

@ -19,7 +19,6 @@ class Kernel extends HttpKernel
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
// todo: These two may need to be moved into 'web' not to be called in 'api'.
\App\Http\Middleware\ResponseHeaders::class,
\App\Http\Middleware\TerminateHandler::class,
];
@ -45,10 +44,10 @@ class Kernel extends HttpKernel
\App\Http\Middleware\CustomHandle::class,
],
'api' => [
'throttle:60,1',
'bindings',
],
// 'api' => [
// 'throttle:60,1',
// 'bindings',
// ],
];
/**

View File

@ -35,7 +35,7 @@ class RouteServiceProvider extends ServiceProvider
*/
public function map()
{
$this->mapApiRoutes();
//$this->mapApiRoutes();
$this->mapWebRoutes();
@ -71,11 +71,11 @@ class RouteServiceProvider extends ServiceProvider
*
* @return void
*/
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
// protected function mapApiRoutes()
// {
// Route::prefix('api')
// ->middleware('api')
// ->namespace($this->namespace)
// ->group(base_path('routes/api.php'));
// }
}

View File

@ -41,10 +41,10 @@ return [
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
// 'api' => [
// 'driver' => 'token',
// 'provider' => 'users',
// ],
],
/*

View File

@ -1,18 +0,0 @@
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});