tangoclinh1995 / thehonorclub-mobileapp

The Honor Club's Mobile App Project for COMP 3111H
2 stars 1 forks source link

[Implementation] Angular service for Join Team, Invite Member and Accept Matching #18

Open tangoclinh1995 opened 7 years ago

tangoclinh1995 commented 7 years ago

I will implement service $matchingRequest with the following 3 functions:

  1. joinTeam(fromUserUid, toTeamUid, eventUid):

    • An user requests to join a team in an event
    • It returns a Promise(status):
    • status = $matchingRequest.REQUEST_MATCH: A match is found.
    • status = $matchingRequest.REQUEST_NOMATCH: No match is found at the moment
    • status = $matchingRequest.REQUEST_INVALID: This request is invalid
  2. inviteMember(fromTeamUid, toMemberUid, eventUid):

    • A team wants to invite a new member to join in an event
    • It returns a Promise(status):
    • status = $matchingRequest.REQUEST_MATCH: A match is found.
    • status = $matchingRequest.REQUEST_NOMATCH: No match is found at the moment
    • status = $matchingRequest.REQUEST_INVALID: This request is invalid
  3. acceptMatch (teamUid, userUid, eventUid, maxMemberPerTeam): If A MATCH IS FOUND between a team and an user, then call this function to save the matching into Firebase database

jshin49 commented 7 years ago

Just to be clear, there isn't any logic for actually finding a match here, right?

If I am right, that is why we need a better database schema for invite requests and join requests.