40) type mismatch;
found : scala.concurrent.Future[Seq[model.Event]]
required: akka.http.scaladsl.marshalling.ToResponseMarshallable
complete(eventService.getPage(page))
Event:
case class Event(
id: Option[EventId] = None,
startTime: LocalDateTime,
endTime: LocalDateTime)
Использую Slick + Akka HTTP.
ниже не читал, без уточнений формата бросаю рандом implicit val localDateMarshaller: Marshaller[LocalDateTime, HttpResponse] = implicitly[Marshaller[ByteString, HttpResponse]] .compose[LocalDateTime](ldt => ByteString(ldt.toLocalDate.toEpochDay, ldt.toLocalTime.toNanoOfDay))
Обсуждают сегодня