mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Revert "Modiy HTTP::Params.[] to fetch all params"
This reverts commit c0745cc9e2
.
This commit is contained in:
parent
0b4856b741
commit
e695a491b7
3 changed files with 98 additions and 88 deletions
|
@ -1,8 +0,0 @@
|
|||
module HTTP
|
||||
struct Params
|
||||
def [](name)
|
||||
params = raw_params[name]
|
||||
params.size == 1 ? params.first : params
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,5 +1,5 @@
|
|||
class HTTP::Request
|
||||
property override_method : String?
|
||||
property override_method
|
||||
property url_params : Hash(String, String)?
|
||||
getter param_parser : Kemal::ParamParser?
|
||||
|
||||
|
@ -21,7 +21,7 @@ class HTTP::Request
|
|||
@param_parser = Kemal::ParamParser.new(self)
|
||||
params = @param_parser.not_nil!.body
|
||||
if params.has_key?("_method") && HTTP::Request.override_method_valid?(params["_method"])
|
||||
@override_method = params["_method"].as(String)
|
||||
@override_method = params["_method"]
|
||||
end
|
||||
end
|
||||
@override_method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue