]> git.immae.eu Git - github/wallabag/wallabag.git/commit
Allow other fields to be send using API
authorJeremy Benoist <jeremy.benoist@gmail.com>
Thu, 11 May 2017 06:14:29 +0000 (08:14 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 31 May 2017 11:59:45 +0000 (13:59 +0200)
commite668a8124c46d47add4248963d77f3b29b37b3ce
treeb9b56d19b06fe268d025c3591119470162efc99a
parent4423b88c5b2c2d530b0a83a822f521a61ca4d4b8
Allow other fields to be send using API

Entry API can now have these new fields:
- content
- language
- preview_picture
- published_at

Re-use the ContentProxy to be able to do the same using the web UI (in the future).
htmLawed is used to clean stuff from content, I hope it’ll be enough to avoid security breach.

Lower content validation when we want to update an entry with content already defined. Before, language & content_type were required. If there weren’t provided, we re-fetched the content using graby. I think these fields aren’t required for an entry to be created. So I removed them.
Which means some import from the v1 export won’t be re-fetched since they provide content, url & title.

Also, remove liberation link from Readability import to avoid overlaping import (from wallabag v1, which had the same link)
src/Wallabag/ApiBundle/Controller/EntryRestController.php
src/Wallabag/CoreBundle/Helper/ContentProxy.php
tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php
tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
tests/Wallabag/ImportBundle/Import/ReadabilityImportTest.php
tests/Wallabag/ImportBundle/fixtures/readability.json