In my old Vapor 3 code I'm creating models like this:
address.create(on: conn).flatMap { savedAddress in
// do something with saved address
}
With the help of the Vapor 4 documentation I'm now passing db to the create function instead of a connection. The issue is, that it seems that flatMap returns Void as I'm getting the following error when I try to access savedAddress: "Value of tuple type 'Void' has no member ...".
How should I rewrite this?