parent
47f2ca0673
commit
20beb2f280
3 changed files with 3 additions and 5 deletions
2
.php_cs
2
.php_cs
|
@ -51,5 +51,5 @@ return PhpCsFixer\Config::create()
|
|||
'equal' => false,
|
||||
'identical' => false,
|
||||
'less_and_greater' => false,
|
||||
]
|
||||
],
|
||||
])->setRiskyAllowed(true)->setFinder($finder);
|
||||
|
|
|
@ -149,8 +149,6 @@ class TaskManagementController extends Controller
|
|||
*
|
||||
* @param \Pterodactyl\Http\Requests\Server\ScheduleCreationFormRequest $request
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Illuminate\Auth\Access\AuthorizationException
|
||||
*/
|
||||
public function update(ScheduleCreationFormRequest $request): RedirectResponse
|
||||
{
|
||||
|
@ -177,7 +175,7 @@ class TaskManagementController extends Controller
|
|||
*/
|
||||
public function delete(Request $request): Response
|
||||
{
|
||||
$server = $request->attributes->get('server_data.model');
|
||||
$server = $request->attributes->get('server');
|
||||
$schedule = $request->attributes->get('schedule');
|
||||
$this->authorize('delete-schedule', $server);
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class ScheduleBelongsToServer
|
|||
$scheduleId = $this->hashids->decodeFirst($request->route()->parameter('schedule'), 0);
|
||||
$schedule = $this->repository->getScheduleWithTasks($scheduleId);
|
||||
|
||||
if (object_get($schedule, 'server_id') !== $server->id) {
|
||||
if ($schedule->server_id !== $server->id) {
|
||||
throw new NotFoundHttpException;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue