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

[BUG] Submit Training Records rejects valid callsigns #89

Open
asherrobinson opened this issue Jul 16, 2022 · 0 comments
Open

[BUG] Submit Training Records rejects valid callsigns #89

asherrobinson opened this issue Jul 16, 2022 · 0 comments
Labels

Comments

@asherrobinson
Copy link

Contact Details

[email protected]

What happened?

When using the API to submit training records, requests are rejected if they don't match an (unnecessarily restrictive) regex. This regex does not currently account for all valid position identifiers. The most recent example from our facility is as follows:

Jul 13, 2022 
Type Checkout
Position NY_66_CTR
Progression ★★★★
Venue Sweatbox
Dur. 60
Mvmts. 20

I believe the relevant code is in App\Http\Controllers\API\v2\TrainingController, in a number of places in the various record creation/modification methods. I'd suggest modifying this regex to allow all valid callsigns, so that valid training records stop getting rejected.

What endpoint was being used?

POST https://api.vatusa.net/v2/user/{cid}/training/record

What error response was returned (if applicable)?

{"data":{"status":"error","msg":"Invalid position."},"testing":false}

Screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant