X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/2fbf5527c70d5d3eadb2767ca5301ad05f7f28c8..refs/pull/5280/head:/app/Activity/Controllers/WatchController.php diff --git a/app/Activity/Controllers/WatchController.php b/app/Activity/Controllers/WatchController.php index d63918fb3..5df75da39 100644 --- a/app/Activity/Controllers/WatchController.php +++ b/app/Activity/Controllers/WatchController.php @@ -14,10 +14,9 @@ class WatchController extends Controller $this->checkPermission('receive-notifications'); $this->preventGuestAccess(); - $requestData = $this->validate($request, [ + $requestData = $this->validate($request, array_merge([ 'level' => ['required', 'string'], - ...$entityHelper->validationRules() - ]); + ], $entityHelper->validationRules())); $watchable = $entityHelper->getVisibleEntityFromRequestData($requestData); $watchOptions = new UserEntityWatchOptions(user(), $watchable); @@ -25,6 +24,6 @@ class WatchController extends Controller $this->showSuccessNotification(trans('activities.watch_update_level_notification')); - return redirect()->back(); + return redirect($watchable->getUrl()); } }