Move sort
by query parameter to dedicated Parameter section in openapi
#95
Labels
tech-debt
Issues that reduce the technical debt of the project
typescript
Pull requests that update Typescript code
Background: #94 (comment)
This will allow us to easily reference the type that is passed in the sort parameter.
Also enable Enum extensions so that frontend can get the generated Enum instead of it trying to maintain its own.
After that, each column can have an Enum assigned to it. And we can modify getSortSpec to return the dedicated Parameter.
webstatus.dev/frontend/src/static/js/utils/urls.ts
Lines 32 to 34 in 59f9414
Instead of forcing the string to the type, we can check the query parameter string against the Enum. And then we can do something in case someone passes a bad query parameter by resetting it back to the default name_asc mode.
The text was updated successfully, but these errors were encountered: