From d62810388ee103cc9cf7e091bf9ca3987947ad0a Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 6 Jul 2014 09:36:55 +0200 Subject: THe JSON REST API return the number of articles in a feed only for one feed. --- pyaggr3g470r/rest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyaggr3g470r/rest.py b/pyaggr3g470r/rest.py index 14870a52..548b7a25 100644 --- a/pyaggr3g470r/rest.py +++ b/pyaggr3g470r/rest.py @@ -254,8 +254,7 @@ class FeedListAPI(Resource): "site_link": feed.site_link, "email_notification": feed.email_notification, "enabled": feed.enabled, - "created_date": feed.created_date, - "nb_articles": feed.articles.count() + "created_date": feed.created_date } for feed in g.user.feeds] ) @@ -310,7 +309,8 @@ class FeedAPI(Resource): "title": feed.title, "description": feed.description, "link": feed.link, - "site_link": feed.site_link + "site_link": feed.site_link, + "nb_articles": feed.articles.count() } for feed in result] ) -- cgit