Skip to content

Commit

Permalink
return NoMatch
Browse files Browse the repository at this point in the history
  • Loading branch information
tatchi committed Jun 16, 2024
1 parent 037ffeb commit 81dc4ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/routes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ let parse_route path handler params =
=
fun t f seen s ->
match t with
| End -> FullMatch [ f ]
| End ->
(match s with
| [] | [ "" ] -> FullMatch [ f ]
| _ -> NoMatch)
| Wildcard -> FullMatch [ f { Parts.prefix = List.rev seen; matched = s } ]
| Match (x, fmt) ->
(match s with
Expand Down

0 comments on commit 81dc4ff

Please sign in to comment.