]> BookStack Code Mirror - bookstack/blobdiff - app/Activity/Controllers/WatchController.php
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / app / Activity / Controllers / WatchController.php
index d63918fb35044d01c807d5641126d0e465434d37..5df75da39cd5b997af3cd710cb553f1204f4f86f 100644 (file)
@@ -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());
     }
 }