I am working on a login process using the Play framework and Scala and I am getting the following error:
No Json serializer as JsObject found for type play.api.libs.json.JsValue. Try to implement an implicit OWrites or OFormat for this type
Here is my model code. What am I doing wrong?
def checkUser(user: Signin): Future[Option[Signin]] = {
val query = BSONDocument("_email" -> user.email, "password" -> user.password)
collection.flatMap(_.find(query).requireOne[Signin])
}