This commit is contained in:
Tokumeikoi 2020-03-30 23:47:54 +08:00
parent 39fadd8a63
commit d1bf743316
2 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,7 @@ namespace App\Http\Controllers\Admin;
use App\Http\Requests\Admin\ServerSave; use App\Http\Requests\Admin\ServerSave;
use App\Http\Requests\Admin\ServerUpdate; use App\Http\Requests\Admin\ServerUpdate;
use App\Services\ServerService;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\ServerGroup; use App\Models\ServerGroup;
@ -190,4 +191,11 @@ class ServerController extends Controller
'data' => true 'data' => true
]); ]);
} }
public function viewConfig(Request $request)
{
$serverService = new ServerService();
$config = $serverService->getConfig($request->input('node_id'), 23333);
die(json_encode($config, JSON_UNESCAPED_UNICODE));
}
} }

View File

@ -29,6 +29,7 @@ class AdminRoute
$router->post('/server/drop', 'Admin\\ServerController@drop'); $router->post('/server/drop', 'Admin\\ServerController@drop');
$router->post('/server/update', 'Admin\\ServerController@update'); $router->post('/server/update', 'Admin\\ServerController@update');
$router->post('/server/copy', 'Admin\\ServerController@copy'); $router->post('/server/copy', 'Admin\\ServerController@copy');
$router->post('/server/viewConfig', 'Admin\\ServerController@viewConfig');
// Order // Order
$router->get ('/order/fetch', 'Admin\\OrderController@fetch'); $router->get ('/order/fetch', 'Admin\\OrderController@fetch');
$router->post('/order/repair', 'Admin\\OrderController@repair'); $router->post('/order/repair', 'Admin\\OrderController@repair');