mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-17 17:08:37 +00:00
Fix rest controller merge
This commit is contained in:
parent
5a619812ca
commit
864c1dd23a
4 changed files with 141 additions and 0 deletions
|
@ -150,6 +150,28 @@ class EntryRestController extends WallabagRestController
|
|||
return (new JsonResponse())->setJson($json);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single entry as a predefined format.
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
|
||||
* }
|
||||
* )
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function getEntryExportAction(Entry $entry, Request $request)
|
||||
{
|
||||
$this->validateAuthentication();
|
||||
$this->validateUserAccess($entry->getUser()->getId());
|
||||
|
||||
return $this->get('wallabag_core.helper.entries_export')
|
||||
->setEntries($entry)
|
||||
->updateTitle('entry')
|
||||
->exportAs($request->attributes->get('_format'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an entry.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue