File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ module Router
12
12
# Define each method for supported http methods
13
13
{% for http_method in HTTP_METHODS % }
14
14
def {{http_method.id}} (path : String , & block : Action )
15
- @route_handler .add_route(" {{http_method.id.upcase}}" + path, block)
15
+ @route_handler .add_route(" / {{http_method.id.upcase}}" + path, block)
16
16
end
17
17
{% end % }
18
18
end
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ module Router
8
8
9
9
def search_route (context : HTTP ::Server ::Context ) : RouteContext ?
10
10
method = context.request.method
11
- route = @tree .find(method.upcase + context.request.path)
11
+ route = @tree .find(" / " + method.upcase + context.request.path)
12
12
13
- return { action: route.payload, params: route.params } if route.found?
13
+ return {action: route.payload, params: route.params} if route.found?
14
14
15
15
nil
16
16
end
You can’t perform that action at this time.
0 commit comments