Skip to content

Conversation

@ZmoleCristian
Copy link
Member

Summary

  • fix improper use of uri! macro in meltdown and home routes

Testing

  • cargo check --offline (fails: failed to load source for dependency rocket_csrf_token)
  • cargo test --offline (fails: failed to load source for dependency rocket_csrf_token)

https://chatgpt.com/codex/tasks/task_b_683d22ee3b1883268cd8dd97dc97f8b9

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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())

@demfabris
Copy link
Collaborator

very very good 👍🏻
lgtm (lets go to moon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants