mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
📯 tRaNsFeR lOgS 📯
This commit is contained in:
@@ -6,6 +6,7 @@ use Webmozart\Assert\Assert;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
|
||||
use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
|
||||
|
||||
class SuspensionService
|
||||
{
|
||||
@@ -56,6 +57,11 @@ class SuspensionService
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if the server is currently being transferred.
|
||||
if ($server->transfer !== null) {
|
||||
throw new ConflictHttpException('Server is currently being transferred');
|
||||
}
|
||||
|
||||
$this->connection->transaction(function () use ($action, $server) {
|
||||
$server->update([
|
||||
'suspended' => $action === self::ACTION_SUSPEND,
|
||||
|
||||
Reference in New Issue
Block a user