opt 1.2.3

This commit is contained in:
Tokumeikoi 2020-03-10 13:45:48 +08:00
parent 68d44e7657
commit 97056be8c3
2 changed files with 16 additions and 0 deletions

View File

@ -171,4 +171,19 @@ class ServerController extends Controller
'data' => true
]);
}
public function copy(Request $request)
{
$server = Server::find($request->input('id'));
if (!$server) {
abort(500, '服务器不存在');
}
if (!Server::create($server)) {
abort(500, '复制失败');
}
return response([
'data' => true
]);
}
}

View File

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