Skip to content

Commit

Permalink
fix: make synonyms lowercase to be able to communicate with server an…
Browse files Browse the repository at this point in the history
…d parse its responses.
  • Loading branch information
Pablo J. Urbano Santos authored and aseure committed Aug 7, 2019
1 parent 89b7017 commit 8d6b41a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/algolia/AlgoliaDsl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ object AlgoliaDsl extends AlgoliaDsl {
val objectID = (x \ "objectID").extract[String]
val synonymType = (x \ "type").extract[String]

synonymType match {
synonymType.toLowerCase match {
case SynonymType.synonym.name =>
Synonym.Synonym(objectID, (x \ "synonyms").extract[Seq[String]])
case SynonymType.altCorrection1.name =>
Expand Down
6 changes: 3 additions & 3 deletions src/main/scala/algolia/objects/Synonym.scala
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,19 @@ object SynonymType {
}

case object oneWaySynonym extends SynonymType {
override val name: String = "oneWaySynonym"
override val name: String = "onewaysynonym"
}

case object placeholder extends SynonymType {
override val name: String = "placeholder"
}

case object altCorrection1 extends SynonymType {
override val name: String = "altCorrection1"
override val name: String = "altcorrection1"
}

case object altCorrection2 extends SynonymType {
override val name: String = "altCorrection2"
override val name: String = "altcorrection2"
}

}

0 comments on commit 8d6b41a

Please sign in to comment.