Skip to content

PA Review: Friendships #4

Description

@andywynkoop

Friendships MVP

Users Controller

  • method for requested friends (to disable button)
  • method for friend requests
  • method for all friends (including both approved requests from others and requests to others that have been approved)

Friendships Controller

  • method for approving a request - in model
  • method for denying a request - via destroy route
  • Data from current_user and page load should determine how a page is displayed (friends/ add friend/ requested versions of button)
  • Friend requests should trigger a one-time notification on the target user (in main nav - save for notifications bonus?)
  • Add data about requests to current_user on the window and include with user data on get requests

Friendship routes

  • GET requests for user data include friend request data - key value pairs instead of array O(1)
  • POST a friendship request, return the updated user with new friendship data /api/friendships
  • PATCH an approval of a request, return the updated user data /api/friendships/:id
  • DELETE a rejection of a request, return the updated user data /api/friendships/:id

Frontend

  • User can send a friend request from a different user's profile page
  • User can click a button in their friend requests dropdown to approve or deny
  • User can approve a friend request from the requesting user's profile page
  • Friend button will display 'friends' if users are already friends
  • Refactor to put friends as key value pairs instead of as an array

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions