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 f540aa4 commit 92b8cfb
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 @@ -29,7 +29,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 92b8cfb

Please sign in to comment.