codebuddies / cb-connect

Platform to connect mentors with mentees, accountability partners, and OS project maintainers with new contributors
GNU General Public License v3.0
14 stars 8 forks source link

Functionality: When a logged-in user clicks on a 'request' button, add that entry ID to the `preferences` list #20

Open lpatmo opened 5 years ago

lpatmo commented 5 years ago

image image image

lpatmo commented 5 years ago

Two tasks:

  "_id": "spx2LvuC7ZjYgexir",
  "userId": "bMnnxiN8QB3w9nAsZ",
  "category": {
    "id": "1",
    "title": "Accountability Partner"
  }, 
   ...
  "preferences": ["Abx2LvuC7ZjYgex1s"], //entries this entry is interested in
  "requesters": ["SCx2Lvua9ZjYgex23"], //entries that want to be matched with this entry
  "createdAt": "2019-04-04T02:05:43.061Z"
}
angelocordon commented 5 years ago

Should also note that user can only submit an entry for a card once (prevent user from clicking request on the same card multiple times and having duplicated values of the user's ID in the preferences column (array)

lpatmo commented 5 years ago

I'm tackling this now!