WYHNUS / ExchangeBuddy

Find your exchange buddies!
5 stars 0 forks source link

Standardize Exchange/Group association #156

Open irvinlim opened 7 years ago

irvinlim commented 7 years ago

As mentioned on Slack, right now we have the following endpoints:

PATCH /updateUni

This endpoint sets the exchange university, adds the user to the group, and sets the default group. However, this prevents the user from adding additional Exchanges.

POST /joinGroup

This endpoint allows the user to join a group by groupId. However, this doesn't work if the Group doesn't exist.


So, the problem is that you cannot join an non-existent group when you are already in another group. Also, there's no way to get a group by the combination of universityId, year and month.

If we are coupling Exchange + Group together, then we should add the Group as a side-effect of adding an Exchange. Could I have an endpoint like POST /addExchangeUni to add exchange university for the current user?

Also, we have term and month columns in Exchanges. Which one are we using?