aboutsummaryrefslogtreecommitdiffstats
path: root/apps/comments/lib/Controller/NotificationsController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/comments/lib/Controller/NotificationsController.php')
-rw-r--r--apps/comments/lib/Controller/NotificationsController.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/comments/lib/Controller/NotificationsController.php b/apps/comments/lib/Controller/NotificationsController.php
index 41a9541a684..0186f8bc736 100644
--- a/apps/comments/lib/Controller/NotificationsController.php
+++ b/apps/comments/lib/Controller/NotificationsController.php
@@ -27,7 +27,7 @@ namespace OCA\Comments\Controller;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\NotFoundResponse;
use OCP\AppFramework\Http\RedirectResponse;
-use OCP\AppFramework\Http\Response;
+use OCP\AppFramework\Http;
use OCP\Comments\IComment;
use OCP\Comments\ICommentsManager;
use OCP\Files\IRootFolder;
@@ -38,8 +38,6 @@ use OCP\IUserSession;
use OCP\Notification\IManager;
/**
- * Class NotificationsController
- *
* @package OCA\Comments\Controller
*/
class NotificationsController extends Controller {
@@ -73,8 +71,17 @@ class NotificationsController extends Controller {
/**
* @PublicPage
* @NoCSRFRequired
+ *
+ * View a notification
+ *
+ * @param string $id ID of the notification
+ *
+ * @return RedirectResponse<Http::STATUS_SEE_OTHER, array{}>|NotFoundResponse<Http::STATUS_NOT_FOUND, array{}>
+ *
+ * 303: Redirected to notification
+ * 404: Notification not found
*/
- public function view(string $id): Response {
+ public function view(string $id): RedirectResponse|NotFoundResponse {
$currentUser = $this->userSession->getUser();
if (!$currentUser instanceof IUser) {
return new RedirectResponse(