mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
parent
8cf3f67594
commit
30bdcc9759
2 changed files with 12 additions and 1 deletions
|
@ -8,7 +8,8 @@ module Kemal
|
|||
|
||||
def initialize(@method : String, @path : String, &handler : HTTP::Server::Context -> _)
|
||||
@handler = ->(context : HTTP::Server::Context) do
|
||||
handler.call(context).to_s
|
||||
output = handler.call(context)
|
||||
output.is_a?(String) ? output : ""
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue