This commit is contained in:
Maxime Renou 2020-05-12 14:09:08 +02:00
parent 38066dd0cb
commit 3895fbdb26
2 changed files with 15 additions and 5 deletions

View File

@ -378,16 +378,17 @@ class Connect
public function routes()
{
Route::middleware('web')
->namespace('\Bluesquare\Connect\Controllers')
Route::namespace('\Bluesquare\Connect\Controllers')
->group(function () {
Route::get('connect/authorize', 'ConnectController@authorize');
Route::get('connect/callback', 'ConnectController@callback');
});
}
Route::prefix('api')
->middleware('api')
->namespace('\Bluesquare\Connect\Controllers')
public function apiRoutes()
{
Route::namespace('\Bluesquare\Connect\Controllers')
->prefix('api')
->group(function () {
Route::post('connect/webhook', 'ConnectController@webhook');
});

View File

@ -14,4 +14,13 @@ class Connect extends Facade
{
static::$app->make(\Bluesquare\Connect\Connect::class)->routes();
}
/**
* Register the typical Connect API routes for an application.
* @return void
*/
public static function apiRoutes()
{
static::$app->make(\Bluesquare\Connect\Connect::class)->apiRoutes();
}
}