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

add route requirements for filter options #673

Merged
merged 3 commits into from
Apr 6, 2024
Merged

Conversation

e-five256
Copy link
Member

@e-five256 e-five256 commented Apr 6, 2024

this adds filter options similar to what was done for sortBy to all other filters

right now if you go to say /all/hot/4h it will load but the time selection is invalid and it won't affect anything. This instead makes that route 404 as it is not a valid time option. This seems like where we'd want to stop invalid options first before they get to us and we have to constantly filter out bad data (it does duplicate the values from Criteria, but hopefully it isn't too bad to be in two main places

@e-five256 e-five256 marked this pull request as draft April 6, 2024 15:27
config/services.yaml Outdated Show resolved Hide resolved
breakout comment section sort as it has one less option
@e-five256 e-five256 marked this pull request as ready for review April 6, 2024 15:41
@@ -59,8 +59,16 @@ parameters:

html5_validation: true

front_sort_options: top|hot|active|newest|oldest|commented
front_time_options: 6h|12h|1d|1w|1m|1y|all|∞
front_sort_options: top|hot|active|newest|oldest|commented # TODO remove fallback after tag rework
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

decided to keep this for now as I don't want to touch the tag route file while the tag rework is in progress, we can change it to default_sort_options (and optionally add any other filters) later

@e-five256 e-five256 merged commit fb65de7 into main Apr 6, 2024
7 checks passed
@e-five256 e-five256 deleted the e5/route-requirements branch April 6, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants