Skip to content

Unify crate details handling across all pages #1138

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

Open
Nemo157 opened this issue Oct 28, 2020 · 1 comment
Open

Unify crate details handling across all pages #1138

Nemo157 opened this issue Oct 28, 2020 · 1 comment

Comments

@Nemo157
Copy link
Member

Nemo157 commented Oct 28, 2020

Mostly to fix #1093, but more specific issue for the refactoring I think should solve it.

The metadata used for rendering builds and source files doesn't currently pull enough details from the database for this, I think it might make the most sense to make both of them get the full CrateDetails and move the is_latest_version etc. checking into Tera helpers rather than being extra context variables, removing the separate MetaData struct at the same time.

@syphar
Copy link
Member

syphar commented Oct 24, 2023

I was thinking if this would be even possible using a axum extractor. Or at the very least put it into a shared function that has to return redirects as errors to return early from the handler.

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

No branches or pull requests

2 participants