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

fix: [#624] Fallback doesn't work #156

Merged
merged 4 commits into from
Mar 16, 2025
Merged

fix: [#624] Fallback doesn't work #156

merged 4 commits into from
Mar 16, 2025

Conversation

hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Mar 14, 2025

πŸ“‘ Description

Closes goravel/goravel#624

βœ… Checks

  • Added test cases for my code

@hwbrzzl hwbrzzl changed the base branch from master to v1.3.x March 14, 2025 15:56
@hwbrzzl hwbrzzl marked this pull request as ready for review March 16, 2025 03:50
@Copilot Copilot bot review requested due to automatic review settings March 16, 2025 03:50
@hwbrzzl hwbrzzl requested a review from a team as a code owner March 16, 2025 03:50

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 issue [#624] by addressing the fallback mechanism not working. The changes include:

  • Introducing a new fallback field in the Route struct.
  • Modifying the Fallback() method to set the fallback handler.
  • Adding a registerFallback() function and invoking it in various server start methods.
Comments suppressed due to low confidence (1)

route.go:286

  • The registerFallback() function is called in several methods, which may lead to multiple registrations of the fallback middleware if those methods are invoked more than once. Consider ensuring that the fallback middleware is registered only once to avoid duplicate executions.
func (r *Route) registerFallback() {
@hwbrzzl hwbrzzl merged commit 82cd3c0 into v1.3.x Mar 16, 2025
7 checks passed
@hwbrzzl hwbrzzl deleted the bowen/#624 branch March 16, 2025 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Swagger Routes Inaccessible and Fallback Route Overrides All Routes in Fiber Driver
1 participant