Skip to content

Commit b1b1f44

Browse files
committed
Send the correct information to daemon for new index.js setup
1 parent 419031e commit b1b1f44

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/Http/Controllers/Daemon/ServiceController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
namespace Pterodactyl\Http\Controllers\Daemon;
2626

27-
use Storage;
2827
use Illuminate\Http\Request;
2928
use Pterodactyl\Models\Service;
3029
use Pterodactyl\Models\ServiceOption;
@@ -46,7 +45,7 @@ public function list(Request $request)
4645
foreach (Service::all() as $service) {
4746
$response[$service->folder] = [
4847
'main.json' => sha1($this->getConfiguration($service->id)->toJson()),
49-
'index.js' => sha1_file(storage_path('app/services/' . $service->folder . '/index.js')),
48+
'index.js' => sha1($service->index_file),
5049
];
5150
}
5251

@@ -66,7 +65,7 @@ public function pull(Request $request, $folder, $file)
6665
$service = Service::where('folder', $folder)->firstOrFail();
6766

6867
if ($file === 'index.js') {
69-
return response()->file(storage_path('app/services/' . $service->folder . '/index.js'));
68+
return response($service->index_file)->header('Content-Type', 'text/plain');
7069
} else if ($file === 'main.json') {
7170
return response()->json($this->getConfiguration($service->id));
7271
}

0 commit comments

Comments
 (0)