This patch was authored and released by @tanner0101.
Fixes an issue causing URLEncodedFormDecoder
's single value decoder to not detect nil
correctly (#2463, fixes #2460).
This could result in req.query.get
throwing an error instead of returning nil
if the key was missing.
// This code will now return `nil` instead of throwing if the key is missing.
// It will still throw an error if the value cannot be converted to an Int.
let page = try req.query.get(Int?.self, at: "page")