When using the code from the book (version 2.2.0) I run into an error in the func forgottenPasswordPostHandler( _ req: Request) throws → Future
{“error”:true,“reason”:“Cannot use sync decode on a streaming body.”}
I think those two lines are at fault:
let email = try req.content.syncGet(String. self , at: “email”)
return User.query(on: req).filter(.email == email).first().flatMap(to: View. self ) { user in
Can you help?