Update ServerController.php

This commit is contained in:
SahrulGnwn 2022-08-12 20:55:22 +07:00
parent f15efd26bd
commit a9f7de3f45

View file

@ -227,6 +227,7 @@ class ServerController extends Controller
/** Show Server Settings */
public function show(Server $server)
{
if($server->user_id != Auth::user()->id) return redirect()->route('servers.index');
$serverAttributes = Pterodactyl::getServerAttributes($server->pterodactyl_id);
$serverRelationships = $serverAttributes['relationships'];
$serverLocationAttributes = $serverRelationships['location']['attributes'];
@ -254,6 +255,7 @@ class ServerController extends Controller
public function upgrade(Server $server, Request $request)
{
if($server->user_id != Auth::user()->id) return redirect()->route('servers.index');
if(!isset($request->product_upgrade))
{
return redirect()->route('servers.show', ['server' => $server->id])->with('error', __('this product is the only one'));