summaryrefslogtreecommitdiffstats
path: root/api/feedapi.php
diff options
context:
space:
mode:
Diffstat (limited to 'api/feedapi.php')
-rw-r--r--api/feedapi.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/api/feedapi.php b/api/feedapi.php
index 4ad9b3307..0880434d8 100644
--- a/api/feedapi.php
+++ b/api/feedapi.php
@@ -183,6 +183,28 @@ class FeedAPI extends Controller {
/**
+ * @IsAdminExemption
+ * @IsSubAdminExemption
+ * @CSRFExemption
+ * @Ajax
+ * @API
+ */
+ public function rename() {
+ $userId = $this->api->getUserId();
+ $feedId = (int) $this->params('feedId');
+ $feedTitle = $this->params('feedTitle');
+
+ try {
+ $this->feedBusinessLayer->rename($feedId, $feedTitle, $userId);
+ return new JSONResponse();
+ } catch(BusinessLayerException $ex) {
+ return new JSONResponse(array('message' => $ex->getMessage()),
+ Http::STATUS_NOT_FOUND);
+ }
+ }
+
+
+ /**
* @CSRFExemption
* @Ajax
* @API