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?
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
andmonth
.If we are coupling
Exchange
+Group
together, then we should add theGroup
as a side-effect of adding anExchange
. Could I have an endpoint likePOST /addExchangeUni
to add exchange university for the current user?Also, we have
term
andmonth
columns inExchanges
. Which one are we using?