Merge branch 'develop' into feature/vuejs-auth
This commit is contained in:
commit
cf90f56777
188 changed files with 854 additions and 625 deletions
|
@ -41,7 +41,7 @@ class EggRetrievalController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Return a JSON array of Eggs and the SHA1 hash of thier configuration file.
|
||||
* Return a JSON array of Eggs and the SHA1 hash of their configuration file.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
|
|
|
@ -65,6 +65,7 @@ class ApiController extends Controller
|
|||
* Render view allowing an admin to create a new application API key.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function create(): View
|
||||
{
|
||||
|
|
|
@ -103,7 +103,6 @@ class LocationController extends Controller
|
|||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
* @throws \Watson\Validating\ValidationException
|
||||
*/
|
||||
public function create(LocationFormRequest $request)
|
||||
{
|
||||
|
@ -121,7 +120,6 @@ class LocationController extends Controller
|
|||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
* @throws \Watson\Validating\ValidationException
|
||||
*/
|
||||
public function update(LocationFormRequest $request, Location $location)
|
||||
{
|
||||
|
|
|
@ -90,10 +90,11 @@ class EggVariableController extends Controller
|
|||
* Handle a request to create a new Egg variable.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Admin\Egg\EggVariableFormRequest $request
|
||||
* @param \Pterodactyl\Models\Egg $egg
|
||||
* @param \Pterodactyl\Models\Egg $egg
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Service\Egg\Variable\BadValidationRuleException
|
||||
* @throws \Pterodactyl\Exceptions\Service\Egg\Variable\ReservedVariableNameException
|
||||
*/
|
||||
public function store(EggVariableFormRequest $request, Egg $egg): RedirectResponse
|
||||
|
|
|
@ -35,6 +35,7 @@ use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
|
|||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
|
||||
use Pterodactyl\Contracts\Repository\AllocationRepositoryInterface;
|
||||
use Pterodactyl\Http\Requests\Admin\Servers\Databases\StoreServerDatabaseRequest;
|
||||
|
||||
class ServersController extends Controller
|
||||
{
|
||||
|
@ -375,9 +376,15 @@ class ServersController extends Controller
|
|||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\View\View
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
*/
|
||||
public function viewManage(Server $server)
|
||||
{
|
||||
if ($server->installed > 1) {
|
||||
throw new DisplayException('This server is in a failed installation state and must be deleted and recreated.');
|
||||
}
|
||||
|
||||
return view('admin.servers.view.manage', ['server' => $server]);
|
||||
}
|
||||
|
||||
|
@ -462,6 +469,7 @@ class ServersController extends Controller
|
|||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
|
||||
*/
|
||||
public function rebuildContainer(Server $server)
|
||||
{
|
||||
|
@ -540,7 +548,8 @@ class ServersController extends Controller
|
|||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
|
@ -556,15 +565,13 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Creates a new database assigned to a specific server.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $server
|
||||
* @param \Pterodactyl\Http\Requests\Admin\Servers\Databases\StoreServerDatabaseRequest $request
|
||||
* @param int $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
*/
|
||||
public function newDatabase(Request $request, $server)
|
||||
public function newDatabase(StoreServerDatabaseRequest $request, $server)
|
||||
{
|
||||
$this->databaseManagementService->create($server, [
|
||||
'database' => $request->input('database'),
|
||||
|
|
|
@ -76,6 +76,8 @@ class AdvancedController extends Controller
|
|||
/**
|
||||
* @param \Pterodactyl\Http\Requests\Admin\Settings\AdvancedSettingsFormRequest $request
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function update(AdvancedSettingsFormRequest $request): RedirectResponse
|
||||
{
|
||||
|
|
|
@ -74,6 +74,8 @@ class IndexController extends Controller
|
|||
*
|
||||
* @param \Pterodactyl\Http\Requests\Admin\Settings\BaseSettingsFormRequest $request
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function update(BaseSettingsFormRequest $request): RedirectResponse
|
||||
{
|
||||
|
|
|
@ -83,7 +83,9 @@ class MailController extends Controller
|
|||
* @param \Pterodactyl\Http\Requests\Admin\Settings\MailSettingsFormRequest $request
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function update(MailSettingsFormRequest $request): RedirectResponse
|
||||
{
|
||||
|
|
|
@ -104,8 +104,6 @@ class DatabaseController extends ApplicationApiController
|
|||
* @return \Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
*/
|
||||
public function store(StoreServerDatabaseRequest $request): JsonResponse
|
||||
{
|
||||
|
|
|
@ -96,7 +96,7 @@ class SecurityController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Verifies that 2FA token recieved is valid and will work on the account.
|
||||
* Verifies that 2FA token received is valid and will work on the account.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
|
|
|
@ -101,7 +101,7 @@ class FileActionsController extends Controller
|
|||
{
|
||||
$server = $request->attributes->get('server');
|
||||
|
||||
$dirname = pathinfo($file, PATHINFO_DIRNAME);
|
||||
$dirname = str_replace('\\', '/', pathinfo($file, PATHINFO_DIRNAME));
|
||||
try {
|
||||
$content = $this->repository->setServer($server)->setToken($request->attributes->get('server_token'))->getContent($file);
|
||||
} catch (RequestException $exception) {
|
||||
|
|
Reference in a new issue