summaryrefslogtreecommitdiffstats
path: root/lib/Controller
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-07-19 09:59:15 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-07-19 09:59:15 -0100
commite1abbf1987fc759d72a687f2b4efdb2cf7214b01 (patch)
treedf1f3e0180bb0fc1fd2e53dcd2cbeb5ef7465246 /lib/Controller
parentba7d78952e86c2f1ea0b192827ef19e893dcab8c (diff)
adding liked stream
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Controller')
-rw-r--r--lib/Controller/LocalController.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Controller/LocalController.php b/lib/Controller/LocalController.php
index 69294bf8..b731be2e 100644
--- a/lib/Controller/LocalController.php
+++ b/lib/Controller/LocalController.php
@@ -468,6 +468,28 @@ class LocalController extends Controller {
/**
+ * Get liked post
+ *
+ * @NoAdminRequired
+ *
+ * @param int $since
+ * @param int $limit
+ *
+ * @return DataResponse
+ */
+ public function streamLiked(int $since = 0, int $limit = 5): DataResponse {
+ try {
+ $this->initViewer(true);
+ $posts = $this->noteService->getStreamLiked($since, $limit);
+
+ return $this->success($posts);
+ } catch (Exception $e) {
+ return $this->fail($e);
+ }
+ }
+
+
+ /**
* @NoAdminRequired
*
* @param string $account