Improve client API route model binding and prevent accidental route access without valid model binds
This commit is contained in:
parent
e1089e0b73
commit
4d1a7e6637
4 changed files with 119 additions and 39 deletions
|
@ -88,10 +88,6 @@ class ScheduleController extends ClientApiController
|
|||
*/
|
||||
public function view(ViewScheduleRequest $request, Server $server, Schedule $schedule): array
|
||||
{
|
||||
if ($schedule->server_id !== $server->id) {
|
||||
throw new NotFoundHttpException();
|
||||
}
|
||||
|
||||
$schedule->loadMissing('tasks');
|
||||
|
||||
return $this->fractal->item($schedule)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue