Phoenix-Next (PN) will be adding a component on the campaign page to allow users to signup for a competition once they affiliate with the campaign. For the time being this component will be a persistent item at the top of the Action page regardless of whether the user is signed up or not.
We need Gladiator to expose a couple things for PN via the API, such as asking if a user is signed up for a contest (making sure to account for a user being in a waiting room OR already moved into a competition). PN will be making a get request to the users endpoint and pass along the following parameters:
I believe that's the minimum amount of info Gladiator would need to figure out if the specified user is in a contest, by filtering via the users index endpoint.
Also, we need to make sure that Gladiator checks to confirm a user is not already in a contest (waiting room or competition; but maybe checking against the contest is enough) since PN will for the time being only use local storage in the browser to know if a user signed up for a competition or not. It is very possible that if the local storage is cleared or the user is on a new browser, then they could click to signup for a competition again. Previously, Phoenix-Ashes has a DB table that knew whether a user was signed up or not, so no extra requests would get sent to Gladiator. Since PN for the time being isn't doing that, Gladiator should be double-checking (probs should be doing this anyhoo!).
Here is the work already done on PN to enable making API requests to Gladiator if needed for reference!
Phoenix-Next (PN) will be adding a component on the campaign page to allow users to signup for a competition once they affiliate with the campaign. For the time being this component will be a persistent item at the top of the Action page regardless of whether the user is signed up or not.
We need Gladiator to expose a couple things for PN via the API, such as asking if a user is signed up for a contest (making sure to account for a user being in a waiting room OR already moved into a competition). PN will be making a get request to the users endpoint and pass along the following parameters:
I believe that's the minimum amount of info Gladiator would need to figure out if the specified user is in a contest, by filtering via the
users index
endpoint.Also, we need to make sure that Gladiator checks to confirm a user is not already in a contest (waiting room or competition; but maybe checking against the contest is enough) since PN will for the time being only use local storage in the browser to know if a user signed up for a competition or not. It is very possible that if the local storage is cleared or the user is on a new browser, then they could click to signup for a competition again. Previously, Phoenix-Ashes has a DB table that knew whether a user was signed up or not, so no extra requests would get sent to Gladiator. Since PN for the time being isn't doing that, Gladiator should be double-checking (probs should be doing this anyhoo!).
Here is the work already done on PN to enable making API requests to Gladiator if needed for reference!