Apply fixes from StyleCI (#325)
This commit is contained in:
parent
cb6b44d4f0
commit
bbf9fd12ae
4 changed files with 5 additions and 5 deletions
|
@ -128,8 +128,9 @@ class ServersController extends Controller
|
||||||
public function postNewServerGetNodes(Request $request)
|
public function postNewServerGetNodes(Request $request)
|
||||||
{
|
{
|
||||||
$nodes = Models\Node::with('allocations')->where('location_id', $request->input('location'))->get();
|
$nodes = Models\Node::with('allocations')->where('location_id', $request->input('location'))->get();
|
||||||
|
|
||||||
return $nodes->map(function ($item) {
|
return $nodes->map(function ($item) {
|
||||||
$filtered = $item->allocations->where('server_id', null)->map(function($map) {
|
$filtered = $item->allocations->where('server_id', null)->map(function ($map) {
|
||||||
return collect($map)->only(['id', 'ip', 'port']);
|
return collect($map)->only(['id', 'ip', 'port']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
namespace Pterodactyl\Http\Middleware;
|
namespace Pterodactyl\Http\Middleware;
|
||||||
|
|
||||||
use Theme;
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Contracts\Auth\Guard;
|
use Illuminate\Contracts\Auth\Guard;
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@ use Cache;
|
||||||
use Javascript;
|
use Javascript;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
use Nicolaslopezj\Searchable\SearchableTrait;
|
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
use Nicolaslopezj\Searchable\SearchableTrait;
|
||||||
|
|
||||||
class Server extends Model
|
class Server extends Model
|
||||||
{
|
{
|
||||||
|
|
|
@ -268,7 +268,7 @@ class ServerRepository
|
||||||
|
|
||||||
// Add Additional Allocations
|
// Add Additional Allocations
|
||||||
if (isset($data['allocation_additional']) && is_array($data['allocation_additional'])) {
|
if (isset($data['allocation_additional']) && is_array($data['allocation_additional'])) {
|
||||||
foreach($data['allocation_additional'] as $allocation) {
|
foreach ($data['allocation_additional'] as $allocation) {
|
||||||
$model = Models\Allocation::where('id', $allocation)->where('node_id', $data['node_id'])->whereNull('server_id')->first();
|
$model = Models\Allocation::where('id', $allocation)->where('node_id', $data['node_id'])->whereNull('server_id')->first();
|
||||||
if (! $model) {
|
if (! $model) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue