Cleanup frontend controllers and middleware
This commit is contained in:
parent
d73d580724
commit
e0d03513e4
33 changed files with 400 additions and 594 deletions
|
@ -9,23 +9,28 @@
|
|||
|
||||
namespace Pterodactyl\Contracts\Repository;
|
||||
|
||||
use Pterodactyl\Models\Schedule;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
interface ScheduleRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Return all of the schedules for a given server.
|
||||
*
|
||||
* @param int $server
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getServerSchedules($server);
|
||||
public function findServerSchedules(int $server): Collection;
|
||||
|
||||
/**
|
||||
* Return a schedule model with all of the associated tasks as a relationship.
|
||||
*
|
||||
* @param int $schedule
|
||||
* @return \Illuminate\Support\Collection
|
||||
* @return \Pterodactyl\Models\Schedule
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getScheduleWithTasks($schedule);
|
||||
public function getScheduleWithTasks(int $schedule): Schedule;
|
||||
|
||||
/**
|
||||
* Return all of the schedules that should be processed.
|
||||
|
|
|
@ -1,35 +1,28 @@
|
|||
<?php
|
||||
/**
|
||||
* Pterodactyl - Panel
|
||||
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
||||
*
|
||||
* This software is licensed under the terms of the MIT license.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Contracts\Repository;
|
||||
|
||||
use Pterodactyl\Models\Subuser;
|
||||
|
||||
interface SubuserRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Return a subuser with the associated server relationship.
|
||||
*
|
||||
* @param int $id
|
||||
* @param \Pterodactyl\Models\Subuser $subuser
|
||||
* @param bool $refresh
|
||||
* @return \Pterodactyl\Models\Subuser
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getWithServer($id);
|
||||
public function getWithServer(Subuser $subuser, bool $refresh = false): Subuser;
|
||||
|
||||
/**
|
||||
* Return a subuser with the associated permissions relationship.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
* @param \Pterodactyl\Models\Subuser $subuser
|
||||
* @param bool $refresh
|
||||
* @return \Pterodactyl\Models\Subuser
|
||||
*/
|
||||
public function getWithPermissions($id);
|
||||
public function getWithPermissions(Subuser $subuser, bool $refresh = false): Subuser;
|
||||
|
||||
/**
|
||||
* Return a subuser and associated permissions given a user_id and server_id.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue