aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller/EntryRestController.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-11-03 17:29:16 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-11-03 17:29:16 +0100
commit864c1dd23a4aa9e5f412302694d9303070dca6dc (patch)
tree9d84fbb6898d86e0e3bf7aaf193db89c45e88097 /src/Wallabag/ApiBundle/Controller/EntryRestController.php
parent5a619812ca3eb05a82a023ccdaee13501eb8d45f (diff)
downloadwallabag-864c1dd23a4aa9e5f412302694d9303070dca6dc.tar.gz
wallabag-864c1dd23a4aa9e5f412302694d9303070dca6dc.tar.zst
wallabag-864c1dd23a4aa9e5f412302694d9303070dca6dc.zip
Fix rest controller merge
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller/EntryRestController.php')
-rw-r--r--src/Wallabag/ApiBundle/Controller/EntryRestController.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
index b3622c62..c5bf1df8 100644
--- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
@@ -151,6 +151,28 @@ class EntryRestController extends WallabagRestController
151 } 151 }
152 152
153 /** 153 /**
154 * Retrieve a single entry as a predefined format.
155 *
156 * @ApiDoc(
157 * requirements={
158 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
159 * }
160 * )
161 *
162 * @return Response
163 */
164 public function getEntryExportAction(Entry $entry, Request $request)
165 {
166 $this->validateAuthentication();
167 $this->validateUserAccess($entry->getUser()->getId());
168
169 return $this->get('wallabag_core.helper.entries_export')
170 ->setEntries($entry)
171 ->updateTitle('entry')
172 ->exportAs($request->attributes->get('_format'));
173 }
174
175 /**
154 * Create an entry. 176 * Create an entry.
155 * 177 *
156 * @ApiDoc( 178 * @ApiDoc(