|
@@ -16,25 +16,6 @@ $api = app('Dingo\Api\Routing\Router');
|
|
|
$api->version('v1', [
|
|
|
'namespace' => 'App\Http\Controllers',
|
|
|
], function ($api) {
|
|
|
-
|
|
|
-
|
|
|
- $api->post('login', 'AuthController@authenticate');
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- $api->group(['middleware' => 'auth:api'], function ($api) {
|
|
|
-
|
|
|
- $api->post('reg', 'AuthController@register');
|
|
|
-
|
|
|
- $api->post('logout', 'AuthController@logout');
|
|
|
-
|
|
|
- $api->post('refresh', 'AuthController@refresh');
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- $api->get('test', 'TestController@index');
|
|
|
-
|
|
|
- $api->get('config', 'ConfigController@index');
|
|
|
$api->group(['namespace' => 'Post'], function ($api) {
|
|
|
|
|
|
$api->post('post', 'PostController@create');
|
|
@@ -50,6 +31,7 @@ $api->version('v1', [
|
|
|
});
|
|
|
|
|
|
$api->group(['middleware' => 'jwt.chxq_auth'], function ($api) {
|
|
|
-
|
|
|
+
|
|
|
+ $api->get('config', 'ConfigController@index');
|
|
|
});
|
|
|
});
|