Skip to content

Commit

Permalink
Rename apply to from in Document
Browse files Browse the repository at this point in the history
  • Loading branch information
dbulaja98 committed Nov 25, 2022
1 parent 027b50a commit ff83908
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ private[elasticsearch] final case class Document(json: String) {
}

private[elasticsearch] object Document {
def apply[A](doc: A)(implicit schema: Schema[A]): Document = Document(
def from[A](doc: A)(implicit schema: Schema[A]): Document = Document(
JsonCodec.jsonEncoder(schema).encodeJson(a = doc, indent = None).toString
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object ElasticRequest {
doc: A,
routing: Option[Routing] = None
): ElasticRequest[Unit] =
Put(index, id, Document(doc), routing)
Put(index, id, Document.from(doc), routing)

private[elasticsearch] final case class GetById(
index: IndexName,
Expand Down

0 comments on commit ff83908

Please sign in to comment.