Rework `POST /matches/:id` to not immediately create a match

In the current version, this call is currently part of a 2 step process. The first POST writes the new match to the database (without bout information), returns its identifiers, and uses these identifiers to return to the client information necessary to create bouts (fencers for that weapon on each team).

If a user exits the /matches/:id/edit page after making the first POST request but not making the second (where the bout information is sent to the server and written to the database) then only an empty match will be written to the database.

We are currently undecided on whether this is a bug or a potentially useful feature. The downside is that users can unknowingly enter empty matches and bloat the database. The upside is that bout committee can preemptively enter matches to be updated with bout information later. Requires user testing over long-term use to make a better-informed design decision.

Assigned to
2 years ago
2 years ago
type:bug type:feature_request

~zezip 2 years ago

Potential solution is to not write to the database on the initial POST and save a cookie containing all fencer options for the given teams.

Register here or Log in to comment, or comment via email.