fix: tests type errors
This commit is contained in:
@@ -16,6 +16,9 @@ module App::Controllers
|
||||
env.response.status_code = 301
|
||||
env.response.headers.add("Location", url)
|
||||
env.response.headers.add("X-Forwarded-For", remote_address)
|
||||
if user_agent = env.request.headers["User-Agent"]?
|
||||
env.response.headers.add("User-Agent", user_agent)
|
||||
end
|
||||
|
||||
# non-blocking click proccessing
|
||||
spawn do
|
||||
|
||||
@@ -145,7 +145,7 @@ module App::Controllers
|
||||
"data" => items.map { |item| yield item },
|
||||
"pagination" => {
|
||||
"has_more" => has_more,
|
||||
"next_cursor" => next_cursor
|
||||
"next" => next_cursor
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
@@ -23,7 +23,7 @@ module App::Lib
|
||||
missing_fields = required_fields.reject { |field| json_params.has_key?(field) }
|
||||
|
||||
unless missing_fields.empty?
|
||||
error_message = missing_fields.join(", ") + " required"
|
||||
error_message = "#{missing_fields.first}: Required field"
|
||||
raise App::BadRequestException.new(@env, error_message)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user