Tracking likes during Feed generation

by whitewalker   Last Updated August 24, 2019 13:05 PM

I'm currently building an application that has a feed system for users. I currently use serverless architecture (AWS Lambda + DynamoDB) as a backend. Once user creates a new post, the values are updated in 'posts' and 'users' table. The feed is generated by the automatically populated GSI(DynamoDB feature). Once the API is called the response is generated from the index.

The schema corresponding to the likes in the tables are as follows: 'users' table: liked_posts_list (Map) [The posts liked by the user] 'posts' table: liked_users_list (Map) [The user IDs of the users that liked the post]

The problem starts here, when the user calls the feed API, a list of 10 posts are returned. But I can't find a way to track the posts the current user has already liked.

Any solutions would be appreciated.



Related Questions




Know file size with a base64 string

Updated July 04, 2015 13:02 PM