I am writing an application where I have different types of entities. I
wrote a generic DAO object with Slick to perform basic CRUD operations, and
I want to create routes to make a simples http service for these entities.
I have similar routes, so I wanted to write a function for a generic CRUD
routes.
Now the problem is, I can assign part of a route to a `val` and then put
that in the route definition like a directive. But if I use a `def` in
order to write a function to take parameters and write each specific route,
with type parameters, it doesn't work. I get an error like:
Error:(33, 18) type mismatch;
found : scala.concurrent.Future[Option[E]]
required: akka.http.scaladsl.marshalling.ToResponseMarshallable
dao.get(elementId)
^
I suppose it might be the need for some implicit parameter, I don't know.
Any hints?
++nic
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.