Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes improper use of the uri! macro by replacing it with static string literals for redirect URIs in error responses. Key changes include:
- Replacing uri! macro calls with hard-coded URI strings in home routes.
- Updating the error redirection path in the meltdown module.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/routes/home.rs | Replaced uri! macro usage with static string literals for login redirects. |
| src/meltdown.rs | Updated redirection in error conversion to use a static string literal. |
Comments suppressed due to low confidence (2)
src/routes/home.rs:21
- Switching from the uri! macro to a plain string literal disables compile-time route validation. Confirm that this change is intentional and that route typos or mismatches are caught elsewhere.
return Err(Flash::error(Redirect::to("/vessel/auth/login"), error.user_message()));
src/meltdown.rs:352
- Note the difference in URI ('/auth/login' vs '/vessel/auth/login') compared to home routes. Verify that both redirection paths are correct and consistent with the application's authentication flow.
Flash::error(Redirect::to("/auth/login"), error.user_message())
lucas-clairvo
approved these changes
Jun 11, 2025
Collaborator
|
very very good 👍🏻 |
demfabris
approved these changes
Jun 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uri!macro in meltdown and home routesTesting
cargo check --offline(fails: failed to load source for dependencyrocket_csrf_token)cargo test --offline(fails: failed to load source for dependencyrocket_csrf_token)https://chatgpt.com/codex/tasks/task_b_683d22ee3b1883268cd8dd97dc97f8b9