From 9586a23c212f30d5421ca0e6d034ddb5e45eba28 Mon Sep 17 00:00:00 2001 From: brantje Date: Fri, 7 Oct 2016 15:52:09 +0200 Subject: [PATCH] Small error 500 fix --- controller/sharecontroller.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/controller/sharecontroller.php b/controller/sharecontroller.php index f8248e0c..66e8ad99 100644 --- a/controller/sharecontroller.php +++ b/controller/sharecontroller.php @@ -246,18 +246,16 @@ class ShareController extends ApiController { if($sr){ $this->shareService->cleanItemRequestsForUser($sr); + $manager = \OC::$server->getNotificationManager(); + $notification = $manager->createNotification(); + $notification->setApp('passman') + ->setObject('passman_share_request', $sr->getId()) + ->setUser($user_id); + $manager->markProcessed($notification); } if($acl){ $this->shareService->deleteShareACL($acl); } - - $manager = \OC::$server->getNotificationManager(); - $notification = $manager->createNotification(); - $notification->setApp('passman') - ->setObject('passman_share_request', $sr->getId()) - ->setUser($user_id); - $manager->markProcessed($notification); - return new JSONResponse(array('result' => true)); }