What's Changed
Fix decoding 'flag' URL query params via .decode(StructType.self)
by @challfry in #3164
Fixes #3163.
The code:
struct QueryStruct: Content { var flag1: Bool? } let queryStruct = try req.query.decode(QueryStruct.self)
produces
queryStruct.flag1 == true
when decoding the URL query “?flag1”, matching the behavior ofreq.query[Bool.self, at: "flag1"]
.
New Contributor
This patch was released by @0xTim
Full Changelog: 4.101.2...4.101.3