This breaks literally the entire panel.

This commit is contained in:
Dane Everitt 2017-10-06 23:57:53 -05:00
parent 344c1a9885
commit df87ea0867
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
88 changed files with 1205 additions and 992 deletions

View file

@ -9,9 +9,9 @@
namespace Pterodactyl\Http\Controllers\Daemon;
use Pterodactyl\Models\Egg;
use Illuminate\Http\Request;
use Pterodactyl\Models\Service;
use Pterodactyl\Models\ServiceOption;
use Pterodactyl\Models\Nest;
use Pterodactyl\Http\Controllers\Controller;
class ServiceController extends Controller
@ -27,7 +27,7 @@ class ServiceController extends Controller
public function listServices(Request $request)
{
$response = [];
foreach (Service::all() as $service) {
foreach (Nest::all() as $service) {
$response[$service->folder] = [
'main.json' => sha1($this->getConfiguration($service->id)->toJson()),
'index.js' => sha1($service->index_file),
@ -47,7 +47,7 @@ class ServiceController extends Controller
*/
public function pull(Request $request, $folder, $file)
{
$service = Service::where('folder', $folder)->firstOrFail();
$service = Nest::where('folder', $folder)->firstOrFail();
if ($file === 'index.js') {
return response($service->index_file)->header('Content-Type', 'text/plain');
@ -67,7 +67,7 @@ class ServiceController extends Controller
*/
protected function getConfiguration($id)
{
$options = ServiceOption::where('service_id', $id)->get();
$options = Egg::where('service_id', $id)->get();
return $options->mapWithKeys(function ($item) use ($options) {
return [