@@ -11,19 +11,17 @@ module Kemal
1111
1212 macro only (paths , method = " GET" )
1313 class_name = {{@type .name}}
14- method_downcase = {{method.downcase}}
15- class_name_method = " #{ class_name } /#{ method_downcase } "
14+ class_name_method = " #{ class_name } /#{ {{method}} } "
1615 ({{paths}}).each do |path |
17- @@only_routes_tree .add class_name_method + path, '/' + method_downcase + path
16+ @@only_routes_tree .add class_name_method + path, '/' + {{method}} + path
1817 end
1918 end
2019
2120 macro exclude (paths , method = " GET" )
2221 class_name = {{@type .name}}
23- method_downcase = {{method.downcase}}
24- class_name_method = " #{ class_name } /#{ method_downcase } "
22+ class_name_method = " #{ class_name } /#{ {{method}} } "
2523 ({{paths}}).each do |path |
26- @@exclude_routes_tree .add class_name_method + path, '/' + method_downcase + path
24+ @@exclude_routes_tree .add class_name_method + path, '/' + {{method}} + path
2725 end
2826 end
2927
@@ -74,7 +72,7 @@ module Kemal
7472 end
7573
7674 private def radix_path (method : String , path : String )
77- " #{ self .class} /#{ method.downcase } #{ path } "
75+ " #{ self .class} /#{ method } #{ path } "
7876 end
7977 end
8078end
0 commit comments