Skip to content

Commit 380e222

Browse files
committed
removed parseparam case for Number (it's an abstract type)
1 parent c842b95 commit 380e222

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/utilities/misc.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ function parseparam(::Type{DateTime}, str::String; escape=true)
108108
return parse(DateTime, escape ? HTTP.unescapeuri(str) : str)
109109
end
110110

111-
function parseparam(::Type{Number}, str::String; escape=true)
112-
return parse(Number, escape ? HTTP.unescapeuri(str) : str)
113-
end
114-
115111
function parseparam(::Type{Char}, str::String; escape=true)
116112
value = escape ? HTTP.unescapeuri(str) : str
117113
return first(value)

test/autodoctests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ end
277277
# Routes with different return types to cover all cases
278278

279279
# 0. Test generating docs for more edge cases
280-
@get "/unique-types/{a}/{b}/{c}/{d}/{e}" function(req, a::Char, b::Real, c::Symbol, d::TestEnum2, e::Regex)
281-
return (a,b,c,d,e)
280+
@get "/unique-types/{a}/{b}/{c}/{d}/{e}/{f}" function(req, a::Char, b::Real, c::Symbol, d::TestEnum2, e::Regex, f::Float64)
281+
return (a,b,c,d,e,f)
282282
end
283283

284284
# 1. Custom struct return type
@@ -324,7 +324,7 @@ end
324324
serve(port=PORT, host=HOST, async=true, show_errors=false, show_banner=false, access_log=nothing)
325325

326326
# query metrics endpoints
327-
r = internalrequest(HTTP.Request("GET", "/unique-types/c/0.23/:hello/0/test.*/"), metrics=false)
327+
r = internalrequest(HTTP.Request("GET", "/unique-types/c/0.23/:hello/0/test.*/42.4"), metrics=false)
328328
@test r.status == 200
329329

330330
terminate()

0 commit comments

Comments
 (0)