mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Fix Filter namespace
This commit is contained in:
parent
e310de4f8a
commit
3f3f0d442e
1 changed files with 3 additions and 3 deletions
|
@ -38,15 +38,15 @@ module Kemal::Middleware
|
|||
end
|
||||
|
||||
def add_filters
|
||||
Kemal.config.add_handler Kemal::Filters::Filter.new
|
||||
Kemal.config.add_handler Kemal::Middleware::Filter.new
|
||||
end
|
||||
|
||||
def before(path = "*", options = {} of Symbol => String, &block : HTTP::Server::Context -> _)
|
||||
filter = Kemal.config.handlers.first as Kemal::Filters::Filter
|
||||
filter = Kemal.config.handlers.first as Kemal::Middleware::Filter
|
||||
filter.add :before, path, options, &block
|
||||
end
|
||||
|
||||
def after(path = "*", options = {} of Symbol => String, &block : HTTP::Server::Context -> _)
|
||||
filter = Kemal.config.handlers.first as Kemal::Filters::Filter
|
||||
filter = Kemal.config.handlers.first as Kemal::Middleware::Filter
|
||||
filter.add :after, path, options, &block
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue