summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-07-19 12:53:28 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-07-19 12:53:28 -0100
commitb90ddcda033ce882ce41e06e721832e1a87844dc (patch)
treed03c1abb36a66b90d9cc13f54880b66c20f11652 /lib
parente9a63421a708787687720f2f0430acee16d40a58 (diff)
/local/v1/post?id=Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/LocalController.php20
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