diff --git a/app/Http/Controllers/Server/Controller.php b/app/Http/Controllers/Server/Controller.php new file mode 100644 index 00000000..a8417ecf --- /dev/null +++ b/app/Http/Controllers/Server/Controller.php @@ -0,0 +1,17 @@ +input('token'); + if (empty($token)) { + abort(500, 'token is null'); + } + if ($token !== config('v2board.server_token')) { + abort(500, 'token is error'); + } + } +} diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/Server/DeepbworkController.php similarity index 96% rename from app/Http/Controllers/ServerController.php rename to app/Http/Controllers/Server/DeepbworkController.php index 7fd09314..dc2edd88 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/Server/DeepbworkController.php @@ -1,16 +1,16 @@ middleware('server') ->group(function () { // Server - Route::get('user', 'ServerController@user'); - Route::post('submit', 'ServerController@submit'); - Route::get('config', 'ServerController@config'); + Route::get('deepbwork/user', 'Server\\DeepbworkController@user'); + Route::post('deepbwork/submit', 'Server\\DeepbworkController@submit'); + Route::get('deepbwork/config', 'Server\\DeepbworkController@config'); }); }); \ No newline at end of file