mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
Refactor how repositories for the daemon work.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user