domjudge
domjudge copied to clipboard
Deactivated contests still show up in API
After we deactivate a contest, it is gone from dropdowns etc. in the web interface, but it is still available in the API. I would argue, it should also disappear in the API after deactivation.
Can I try to handle it? Should I do it in the latest main branch? Thank you.
Isn't this already implemented: https://github.com/DOMjudge/domjudge/blob/a75c73a19efe0fb729568f2fcb5625c823ee1002/webapp/src/Controller/API/ContestController.php#L140
Good find Kevin! This has been added by @thijskh in https://github.com/DOMjudge/domjudge/commit/5fd1413bc9012310052e926a842cf3692f34b96d originally.
My personal opinion is that we should be consistent between UI and API and change the default to filter out deactivated contests.
WDYT?
Good find Kevin! This has been added by @thijskh in 5fd1413 originally.
My personal opinion is that we should be consistent between UI and API and change the default to filter out deactivated contests.
WDYT?
So to add a flag alsoInactive and default only show active contests? Makes sense to me.
@vmcj my suggestion would not be to add a separate flag, but just to change the default value of the existing onlyActive flag to true.
Note that we currently DO do this for the root contest endpoint but not for subendpoints like api/contests/xxx/teams. We should be consistent.