Chapter 6. Adding Friendship Capabilities
In Chapter 5, Managing Users, we implemented the user registration and login system. We now have user information in our database and we can continue with one of the most important characteristics of social networks—friendship. In this chapter, we will add a logic for the following:
- Finding friends
- Marking users as friends
- Displaying the linked users on the Profile page
Finding friends
The process of finding friends involves a series of changes in our current codebase. The following sections will guide us through the searching and displaying of friend profiles. We will make a couple of improvements in our REST API and define a new controller and model.
Adding the search page
So far, we have pages for registration, ...
Get Node.js By Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.