I am trying to make this query work:
let email = try req.content.get(String.self, at: "email")
return User.query(on: req.db)
.filter(\User.$email.value == email)
I get two errors:
- Binary operator '==' cannot be applied to operands of type 'KeyPath<User, FieldProperty<User, String>>' and 'String'
- No exact matches in call to instance method 'filter'