Independent-Designers-and-Engineers / stumble-server

NodeJS server for IDE's Stumbl app
https://stumble-server.herokuapp.com
4 stars 2 forks source link

Add pending friend requests #47

Open apwadkar opened 4 years ago

apwadkar commented 4 years ago

If person A wants to add person B as a friend, person A should be added in person B's pending requests. If person B adds person A, and person A is in person B's pending requests, remove A from the list and add both people to each others friend list.

This should be an addition to the POST on /user/:id/friend, and not a new request, unless it's necessary. Likely, an addition should be made to the User model, or make a new model for the list.