]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Controller/WallabagRestController.php
Set the title via POST /api/entries
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / WallabagRestController.php
index 316d45be606b456acfc91d059e09ca9a5d25eb41..5202c524c68da16c0b2f0411e76ebbeeff1a7268 100644 (file)
@@ -109,6 +109,7 @@ class WallabagRestController extends FOSRestController
         $this->validateAuthentication();
 
         $url = $request->request->get('url');
+        $title = $request->request->get('title');
         $isArchived = (int) $request->request->get('archive');
         $isStarred = (int) $request->request->get('starred');
 
@@ -121,6 +122,10 @@ class WallabagRestController extends FOSRestController
             );
         }
 
+        if (!is_null($title)) {
+            $entry->setTitle($title);
+        }
+
         $tags = $request->request->get('tags', '');
         if (!empty($tags)) {
             $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags);