Use ServerTransferringException
This commit is contained in:
parent
e69d9b2c26
commit
37cfa151b6
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
|||
use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Pterodactyl\Exceptions\Http\Server\ServerTransferringException;
|
||||
|
||||
class AuthenticateServerAccess
|
||||
{
|
||||
|
@ -81,7 +82,7 @@ class AuthenticateServerAccess
|
|||
|
||||
if (! is_null($server->transfer)) {
|
||||
if (! $user->root_admin || ($user->root_admin && ! $request->routeIs($this->except))) {
|
||||
throw new ConflictHttpException('Server is currently being transferred.');
|
||||
throw new ServerTransferringException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue