mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Refactor
This commit is contained in:
parent
faedeebee9
commit
1c069ab643
2 changed files with 1 additions and 2 deletions
|
@ -14,7 +14,7 @@ FILTER_METHODS = %w(get post put patch delete options all)
|
|||
end
|
||||
{% end %}
|
||||
|
||||
def ws(path : String, &block : HTTP::WebSocket, HTTP::Server::Context -> Void)
|
||||
def ws(path : String, &block : HTTP::WebSocket, HTTP::Server::Context -> _)
|
||||
raise Kemal::Exceptions::InvalidPathStartException.new("ws", path) unless Kemal::Utils.path_starts_with_slash?(path)
|
||||
Kemal::WebSocketHandler.new path, &block
|
||||
end
|
||||
|
|
|
@ -5,7 +5,6 @@ module Kemal
|
|||
struct Route
|
||||
getter method, path, handler
|
||||
@handler : HTTP::Server::Context -> String
|
||||
@method : String
|
||||
|
||||
def initialize(@method : String, @path : String, &handler : HTTP::Server::Context -> _)
|
||||
@handler = ->(context : HTTP::Server::Context) do
|
||||
|
|
Loading…
Reference in a new issue