Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create pairing functionality #44

Open
leahriffell opened this issue Dec 23, 2020 · 0 comments
Open

Create pairing functionality #44

leahriffell opened this issue Dec 23, 2020 · 0 comments

Comments

@leahriffell
Copy link
Member

leahriffell commented Dec 23, 2020

When a user submits new availability, on the BE we see if there is anyone they can pair with. If so, we create a new user pairing (and mark the user's availability block to fulfilled). If not, then sadness (user's availability block is still open).

To see if an open pairing:

  • compare against any other open availabilities
  • where user has not requested to be blocked
  • where paired_user has not been blocked
  • where paired_user's target language = user's native language
  • where paired_user's native language = user's target language

If A is free 3 - 5 and B is free 2 - 10, just pick the first overlapping spot (3).

@leahriffell leahriffell changed the title Create pairing funcitonality Create pairing functionality Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant