diff --git a/app/Http/Controllers/Server/ServerController.php b/app/Http/Controllers/Server/ServerController.php
index 4995784bc..9b3aecb55 100644
--- a/app/Http/Controllers/Server/ServerController.php
+++ b/app/Http/Controllers/Server/ServerController.php
@@ -51,10 +51,10 @@ class ServerController extends Controller
//
}
- public function getJavascript(Request $request, $uuid, $file)
+ public function getJavascript(Request $request, $uuid, $folder, $file)
{
$server = Models\Server::getByUUID($uuid);
- return response()->view('server.js.' . $server->a_serviceFile . '.' . basename($file, '.js'), [
+ return response()->view('server.js.' . $folder . '.' . basename($file, '.js'), [
'server' => $server,
'node' => Models\Node::find($server->node)
])->header('Content-Type', 'application/javascript');
diff --git a/app/Http/Routes/ServerRoutes.php b/app/Http/Routes/ServerRoutes.php
index 5a454fcd1..9624a0d4e 100644
--- a/app/Http/Routes/ServerRoutes.php
+++ b/app/Http/Routes/ServerRoutes.php
@@ -167,7 +167,7 @@ class ServerRoutes {
// Assorted AJAX Routes
$router->group(['prefix' => 'js'], function ($server) use ($router) {
// Returns Server Status
- $router->get('{file}', [
+ $router->get('{folder}/{file}', [
'as' => 'server.js',
'uses' => 'Server\ServerController@getJavascript'
])->where('file', '.*');
diff --git a/resources/views/server/index.blade.php b/resources/views/server/index.blade.php
index 92eb1bdc1..fc59fce03 100644
--- a/resources/views/server/index.blade.php
+++ b/resources/views/server/index.blade.php
@@ -154,7 +154,7 @@
@if($server->a_serviceFile === 'minecraft')
-
+
@endif