From b1b1f448e9d3fb7154f4c2ca6cd192f1647a33e8 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 12 Mar 2017 16:04:47 -0400 Subject: [PATCH] Send the correct information to daemon for new index.js setup --- app/Http/Controllers/Daemon/ServiceController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Daemon/ServiceController.php b/app/Http/Controllers/Daemon/ServiceController.php index fbbad9b4..6638f30d 100644 --- a/app/Http/Controllers/Daemon/ServiceController.php +++ b/app/Http/Controllers/Daemon/ServiceController.php @@ -24,7 +24,6 @@ namespace Pterodactyl\Http\Controllers\Daemon; -use Storage; use Illuminate\Http\Request; use Pterodactyl\Models\Service; use Pterodactyl\Models\ServiceOption; @@ -46,7 +45,7 @@ class ServiceController extends Controller foreach (Service::all() as $service) { $response[$service->folder] = [ 'main.json' => sha1($this->getConfiguration($service->id)->toJson()), - 'index.js' => sha1_file(storage_path('app/services/' . $service->folder . '/index.js')), + 'index.js' => sha1($service->index_file), ]; } @@ -66,7 +65,7 @@ class ServiceController extends Controller $service = Service::where('folder', $folder)->firstOrFail(); if ($file === 'index.js') { - return response()->file(storage_path('app/services/' . $service->folder . '/index.js')); + return response($service->index_file)->header('Content-Type', 'text/plain'); } else if ($file === 'main.json') { return response()->json($this->getConfiguration($service->id)); }