aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2016-05-02 13:22:45 +0200
committerJeremy Benoist <j0k3r@users.noreply.github.com>2016-05-02 13:22:45 +0200
commitdeb5d9766731dd35bbff75e29867d049a3254061 (patch)
tree4f57a45ec23b0ea869465fbbea3dc41b0ebef265 /src/Wallabag/ApiBundle/Controller
parentf0de35d2ee28031ff6a6a9406b07ed1aafc8ea4b (diff)
parent51a15609b3bb0635e5cbea8511d983e2c5a97fe7 (diff)
downloadwallabag-deb5d9766731dd35bbff75e29867d049a3254061.tar.gz
wallabag-deb5d9766731dd35bbff75e29867d049a3254061.tar.zst
wallabag-deb5d9766731dd35bbff75e29867d049a3254061.zip
Merge pull request #2010 from wallabag/set-title-via-post-api
Set the title via POST /api/entries
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 316d45be..5202c524 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -109,6 +109,7 @@ class WallabagRestController extends FOSRestController
109 $this->validateAuthentication(); 109 $this->validateAuthentication();
110 110
111 $url = $request->request->get('url'); 111 $url = $request->request->get('url');
112 $title = $request->request->get('title');
112 $isArchived = (int) $request->request->get('archive'); 113 $isArchived = (int) $request->request->get('archive');
113 $isStarred = (int) $request->request->get('starred'); 114 $isStarred = (int) $request->request->get('starred');
114 115
@@ -121,6 +122,10 @@ class WallabagRestController extends FOSRestController
121 ); 122 );
122 } 123 }
123 124
125 if (!is_null($title)) {
126 $entry->setTitle($title);
127 }
128
124 $tags = $request->request->get('tags', ''); 129 $tags = $request->request->get('tags', '');
125 if (!empty($tags)) { 130 if (!empty($tags)) {
126 $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); 131 $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags);