mirror of
https://github.com/pelican-dev/panel.git
synced 2026-07-16 04:03:50 +03:00
Switch namespace back to App
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Pterodactyl\Services\Nodes;
|
||||
namespace App\Services\Nodes;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Pterodactyl\Models\Node;
|
||||
use App\Models\Node;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Pterodactyl\Repositories\Eloquent\NodeRepository;
|
||||
use Pterodactyl\Repositories\Wings\DaemonConfigurationRepository;
|
||||
use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException;
|
||||
use Pterodactyl\Exceptions\Service\Node\ConfigurationNotPersistedException;
|
||||
use App\Repositories\Eloquent\NodeRepository;
|
||||
use App\Repositories\Daemon\DaemonConfigurationRepository;
|
||||
use App\Exceptions\Http\Connection\DaemonConnectionException;
|
||||
use App\Exceptions\Service\Node\ConfigurationNotPersistedException;
|
||||
|
||||
class NodeUpdateService
|
||||
{
|
||||
@@ -38,7 +38,7 @@ class NodeUpdateService
|
||||
}
|
||||
|
||||
[$updated, $exception] = $this->connection->transaction(function () use ($data, $node) {
|
||||
/** @var \Pterodactyl\Models\Node $updated */
|
||||
/** @var \App\Models\Node $updated */
|
||||
$updated = $this->repository->withFreshModel()->update($node->id, $data, true, true);
|
||||
|
||||
try {
|
||||
@@ -49,8 +49,6 @@ class NodeUpdateService
|
||||
//
|
||||
// This makes more sense anyways, because only the Panel uses the FQDN for connecting, the
|
||||
// node doesn't actually care about this.
|
||||
//
|
||||
// @see https://github.com/pterodactyl/panel/issues/1931
|
||||
$node->fqdn = $updated->fqdn;
|
||||
|
||||
$this->configurationRepository->setNode($node)->update($updated);
|
||||
@@ -58,13 +56,11 @@ class NodeUpdateService
|
||||
Log::warning($exception, ['node_id' => $node->id]);
|
||||
|
||||
// Never actually throw these exceptions up the stack. If we were able to change the settings
|
||||
// but something went wrong with Wings we just want to store the update and let the user manually
|
||||
// but something went wrong with daemon we just want to store the update and let the user manually
|
||||
// make changes as needed.
|
||||
//
|
||||
// This avoids issues with proxies such as Cloudflare which will see Wings as offline and then
|
||||
// This avoids issues with proxies such as Cloudflare which will see daemon as offline and then
|
||||
// inject their own response pages, causing this logic to get fucked up.
|
||||
//
|
||||
// @see https://github.com/pterodactyl/panel/issues/2712
|
||||
return [$updated, true];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user