aboutsummaryrefslogtreecommitdiff
path: root/mongodb.py
diff options
context:
space:
mode:
Diffstat (limited to 'mongodb.py')
-rw-r--r--mongodb.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mongodb.py b/mongodb.py
index 2360d1a1..3c03c8ed 100644
--- a/mongodb.py
+++ b/mongodb.py
@@ -122,7 +122,12 @@ class Articles(object):
return unread_articles
-
+ def like_article(self, like, feed_id, article_id):
+ """
+ Like or unlike an article.
+ """
+ collection = self.db[str(feed_id)]
+ collection.update({"article_id": article_id}, {"$set": {"article_like": like}})
def list_collections(self):
"""
bgstack15