Skip to content

Commit

Permalink
Add qibla to prayer times even if if doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
makiftutuncu committed Oct 18, 2017
1 parent 380300c commit 25f3f5b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ It returns prayer times for a month belonging to given `countryId`, `cityId` and

* Every key in ``prayerTimes`` object is the date for the prayer times in the value object. Dates are formatted as: `yyyy-MM-dd`
* `fajr`, `shuruq`, `dhuhr`, `asr`, `maghrib`, `isha` and `qibla` are times formatted as `HH:mm`, representing the named times respectively.
* `qibla` key might not always exist.
* `qibla` is set to `00:00` when it is not available.

***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ case class PrayerTimesOfDay(date: LocalDate,
asr.toJson ++
maghrib.toJson ++
isha.toJson ++
qibla.map(_.toJson).getOrElse(Json.obj())
qibla.map(_.toJson).getOrElse(PrayerTime("00:00", PrayerTimeTypes.Qibla).toJson)
}
)

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := """MuezzinAPI"""

version := "2.2"
version := "2.2.1"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

Expand Down

0 comments on commit 25f3f5b

Please sign in to comment.