Apply fixes from StyleCI (#312)
* Bump for release * Apply fixes from StyleCI
This commit is contained in:
parent
ed4068bdb9
commit
b11029a666
|
@ -80,6 +80,7 @@ class APIController extends Controller
|
||||||
return response('', 204);
|
return response('', 204);
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
Log::error($ex);
|
Log::error($ex);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'error' => 'An error occured while attempting to remove this key.',
|
'error' => 'An error occured while attempting to remove this key.',
|
||||||
], 503);
|
], 503);
|
||||||
|
|
|
@ -31,7 +31,6 @@ use Pterodactyl\Models\Server;
|
||||||
|
|
||||||
class ServerPolicy
|
class ServerPolicy
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new policy instance.
|
* Create a new policy instance.
|
||||||
*
|
*
|
||||||
|
@ -62,7 +61,7 @@ class ServerPolicy
|
||||||
})->values();
|
})->values();
|
||||||
});
|
});
|
||||||
|
|
||||||
return ($permissions->search($permission, true) !== false);
|
return $permissions->search($permission, true) !== false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -225,7 +225,7 @@ class APIRepository
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$model = Models\APIKey::with('permissions')->where('public', $key)->where('user_id', $this->user->id)->firstOrFail();
|
$model = Models\APIKey::with('permissions')->where('public', $key)->where('user_id', $this->user->id)->firstOrFail();
|
||||||
foreach($model->permissions as &$permission) {
|
foreach ($model->permissions as &$permission) {
|
||||||
$permission->delete();
|
$permission->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
namespace Pterodactyl\Repositories\Daemon;
|
namespace Pterodactyl\Repositories\Daemon;
|
||||||
|
|
||||||
use GuzzleHttp\Client;
|
|
||||||
use Pterodactyl\Models;
|
use Pterodactyl\Models;
|
||||||
use GuzzleHttp\Exception\RequestException;
|
use GuzzleHttp\Exception\RequestException;
|
||||||
use Pterodactyl\Exceptions\DisplayException;
|
use Pterodactyl\Exceptions\DisplayException;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
namespace Pterodactyl\Repositories\Daemon;
|
namespace Pterodactyl\Repositories\Daemon;
|
||||||
|
|
||||||
use GuzzleHttp\Client;
|
|
||||||
use Pterodactyl\Models;
|
use Pterodactyl\Models;
|
||||||
use Pterodactyl\Exceptions\DisplayException;
|
use Pterodactyl\Exceptions\DisplayException;
|
||||||
|
|
||||||
|
|
|
@ -791,8 +791,8 @@ class ServerRepository
|
||||||
Models\ServerVariable::where('server_id', $server->id)->delete();
|
Models\ServerVariable::where('server_id', $server->id)->delete();
|
||||||
|
|
||||||
// Remove SubUsers
|
// Remove SubUsers
|
||||||
foreach(Models\Subuser::with('permissions')->where('server_id', $server->id)->get() as &$subuser) {
|
foreach (Models\Subuser::with('permissions')->where('server_id', $server->id)->get() as &$subuser) {
|
||||||
foreach($subuser->permissions as &$permission) {
|
foreach ($subuser->permissions as &$permission) {
|
||||||
$permission->delete();
|
$permission->delete();
|
||||||
}
|
}
|
||||||
$subuser->delete();
|
$subuser->delete();
|
||||||
|
|
|
@ -34,7 +34,6 @@ use Validator;
|
||||||
use Pterodactyl\Models;
|
use Pterodactyl\Models;
|
||||||
use Pterodactyl\Services\UuidService;
|
use Pterodactyl\Services\UuidService;
|
||||||
use Pterodactyl\Exceptions\DisplayException;
|
use Pterodactyl\Exceptions\DisplayException;
|
||||||
use Pterodactyl\Notifications\AccountCreated;
|
|
||||||
use Pterodactyl\Exceptions\DisplayValidationException;
|
use Pterodactyl\Exceptions\DisplayValidationException;
|
||||||
|
|
||||||
class UserRepository
|
class UserRepository
|
||||||
|
@ -177,8 +176,8 @@ class UserRepository
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
foreach(Models\Subuser::with('permissions')->where('user_id', $id)->get() as &$subuser) {
|
foreach (Models\Subuser::with('permissions')->where('user_id', $id)->get() as &$subuser) {
|
||||||
foreach($subuser->permissions as &$permission) {
|
foreach ($subuser->permissions as &$permission) {
|
||||||
$permission->delete();
|
$permission->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ return [
|
||||||
|
|
||||||
'env' => env('APP_ENV', 'production'),
|
'env' => env('APP_ENV', 'production'),
|
||||||
|
|
||||||
'version' => env('APP_VERSION', 'canary'),
|
'version' => env('APP_VERSION', '0.6.0-pre.4'),
|
||||||
|
|
||||||
'phrase_in_context' => env('PHRASE_IN_CONTEXT', false),
|
'phrase_in_context' => env('PHRASE_IN_CONTEXT', false),
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue