Merge branch 'develop' into feature/api-v1
# Conflicts: # app/Contracts/Repository/RepositoryInterface.php # app/Repositories/Eloquent/EloquentRepository.php # app/Services/Nodes/NodeUpdateService.php # tests/Unit/Services/Nodes/NodeUpdateServiceTest.php
This commit is contained in:
commit
800e2df6b2
187 changed files with 1878 additions and 3143 deletions
|
@ -96,7 +96,6 @@ class FileActionsController extends Controller
|
|||
* @return \Illuminate\View\View
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function view(UpdateFileContentsFormRequest $request, string $uuid, string $file): View
|
||||
{
|
||||
|
@ -104,9 +103,7 @@ class FileActionsController extends Controller
|
|||
|
||||
$dirname = pathinfo($file, PATHINFO_DIRNAME);
|
||||
try {
|
||||
$content = $this->repository->setNode($server->node_id)->setAccessServer($server->uuid)
|
||||
->setAccessToken($request->attributes->get('server_token'))
|
||||
->getContent($file);
|
||||
$content = $this->repository->setServer($server)->setToken($request->attributes->get('server_token'))->getContent($file);
|
||||
} catch (RequestException $exception) {
|
||||
throw new DaemonConnectionException($exception);
|
||||
}
|
||||
|
|
|
@ -66,10 +66,7 @@ class RemoteRequestController extends Controller
|
|||
}
|
||||
|
||||
try {
|
||||
$listing = $this->repository->setNode($server->node_id)
|
||||
->setAccessServer($server->uuid)
|
||||
->setAccessToken($request->attributes->get('server_token'))
|
||||
->getDirectory($requestDirectory);
|
||||
$listing = $this->repository->setServer($server)->setToken($request->attributes->get('server_token'))->getDirectory($requestDirectory);
|
||||
} catch (RequestException $exception) {
|
||||
throw new DaemonConnectionException($exception, true);
|
||||
}
|
||||
|
@ -90,7 +87,6 @@ class RemoteRequestController extends Controller
|
|||
*
|
||||
* @throws \Illuminate\Auth\Access\AuthorizationException
|
||||
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function store(Request $request): Response
|
||||
{
|
||||
|
@ -98,9 +94,7 @@ class RemoteRequestController extends Controller
|
|||
$this->authorize('save-files', $server);
|
||||
|
||||
try {
|
||||
$this->repository->setNode($server->node_id)
|
||||
->setAccessServer($server->uuid)
|
||||
->setAccessToken($request->attributes->get('server_token'))
|
||||
$this->repository->setServer($server)->setToken($request->attributes->get('server_token'))
|
||||
->putContent($request->input('file'), $request->input('contents') ?? '');
|
||||
|
||||
return response('', 204);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue