From 3a1acaeeeb154cdfd21ecdab4e3a948ebf7c06d5 Mon Sep 17 00:00:00 2001 From: celestora Date: Fri, 7 Jul 2023 14:46:20 +0300 Subject: [PATCH] Fix incorrect rejection invocation in Notes.getNote --- ServiceAPI/Notes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ServiceAPI/Notes.php b/ServiceAPI/Notes.php index c0ecfc32..456cfaee 100644 --- a/ServiceAPI/Notes.php +++ b/ServiceAPI/Notes.php @@ -19,12 +19,12 @@ class Notes implements Handler { $note = $this->notes->get($noteId); if(!$note || $note->isDeleted()) - $reject("Note is gone"); + $reject(83, "Note is gone"); $noteOwner = $note->getOwner(); assert($noteOwner instanceof User); if(!$noteOwner->getPrivacyPermission("notes.read", $this->user)) - $reject("You don't have permission to access this note"); + $reject(160, "You don't have permission to access this note"); $resolve([ "title" => $note->getName(), @@ -38,4 +38,4 @@ class Notes implements Handler ], ]); } -} \ No newline at end of file +}