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

How to check if a route already exists? #57

Open
Neo-Ciber94 opened this issue Apr 12, 2023 · 1 comment
Open

How to check if a route already exists? #57

Neo-Ciber94 opened this issue Apr 12, 2023 · 1 comment

Comments

@Neo-Ciber94
Copy link

I would like to know how to prevent replacing a route with other

@iamgabrieloliveira
Copy link

Can't you do something like this?

fn route_exists(&self, path: &str) -> bool {
    self.router.recognize(path).is_ok()
}

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