mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Removed env from redirect and changed redirect from method to macro.
Removed `env.redirect` in-favor of `redirect` in-order to make Kemal's API look more like Sinatra. Thanks @sdogruyol and @f for introducing me to macros :-). Binding HTTP::Server to 0.0.0.0
This commit is contained in:
parent
d825b2316a
commit
4d1e31cb41
8 changed files with 20 additions and 11 deletions
|
@ -187,7 +187,7 @@ describe "Kemal::Handler" do
|
|||
it "redirects user to provided url" do
|
||||
kemal = Kemal::Handler.new
|
||||
kemal.add_route "GET", "/" do |env|
|
||||
env.redirect("/login")
|
||||
redirect "/login"
|
||||
end
|
||||
request = HTTP::Request.new("GET", "/")
|
||||
response = kemal.call(request)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue