diff options
Diffstat (limited to 'lib/Controller/LocalController.php')
-rw-r--r-- | lib/Controller/LocalController.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Controller/LocalController.php b/lib/Controller/LocalController.php index 69294bf8..9b91131c 100644 --- a/lib/Controller/LocalController.php +++ b/lib/Controller/LocalController.php @@ -183,6 +183,26 @@ class LocalController extends Controller { /** + * get info about a post (limited to viewer rights). + * + * @NoAdminRequired + * + * @param string $id + * + * @return DataResponse + */ + public function postData(string $id): DataResponse { + try { + $this->initViewer(true); + + return $this->directSuccess($this->noteService->getNoteById($id, true)); + } catch (Exception $e) { + return $this->fail($e); + } + } + + + /** * Delete your own post. * * @NoAdminRequired |