Sort tag search by time posted

This commit is contained in:
Socks 2018-04-05 03:20:46 +01:00
parent 5abca18d04
commit b33e43cb00

View file

@ -115,7 +115,7 @@ def get_mentions(username):
def find_posts_by_hashtag(tag): def find_posts_by_hashtag(tag):
return timeline_db.find({'hashtags': tag}) return timeline_db.find({'hashtags': tag}).sort('timePosted', pymongo.DESCENDING)
def post_details(post_id): def post_details(post_id):