mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Add array of paths support for before/after filters (#605)
This commit is contained in:
parent
de5e022222
commit
6e72ebb447
1 changed files with 6 additions and 0 deletions
|
@ -33,5 +33,11 @@ end
|
|||
def {{type.id}}_{{method.id}}(path : String = "*", &block : HTTP::Server::Context -> _)
|
||||
Kemal::FilterHandler::INSTANCE.{{type.id}}({{method}}.upcase, path, &block)
|
||||
end
|
||||
|
||||
def {{type.id}}_{{method.id}}(paths : Array(String), &block : HTTP::Server::Context -> _)
|
||||
paths.each do |path|
|
||||
Kemal::FilterHandler::INSTANCE.{{type.id}}({{method}}.upcase, path, &block)
|
||||
end
|
||||
end
|
||||
{% end %}
|
||||
{% end %}
|
||||
|
|
Loading…
Reference in a new issue