This is a mock backend api made for PureMatch challenge.
I added pagination to posts. Now users can request how many posts they wanna see per page, and which page they wanna see. They do that by sending page size and page number on request query. Added extra checks if user enters page that do not exist or empty.
Users can add friends now. I created new route and controllers for adding friends. The logic works so that once you add someone as friend they will be in your friend list. You will also be in their friend list as well. In order to add a friend you need to send post request with body of the email of person that you wanna add. Post request returns the added friend.
I added friendList endpoint that returns list of friends that user has. And each friend in list shows information about their name, email, posts and number of mutual friends. I found number of mutual friends using nested loops which might not be the most efficient way.