feat: Return location info and Hijri date from the prayer times endpoint

This commit is contained in:
2026-02-21 02:07:22 +03:00
parent 07a9703a89
commit c106d57fe6
9 changed files with 358 additions and 87 deletions
+5
View File
@@ -48,6 +48,7 @@ type locationRow struct {
ASCIIName string `db:"ascii_name"`
AlternateNames string `db:"alternate_names"`
CountryCode string `db:"country_code"`
Timezone string `db:"timezone"`
Latitude float64 `db:"latitude"`
Longitude float64 `db:"longitude"`
DistanceSq float64 `db:"distance_sq"`
@@ -69,6 +70,7 @@ func (p Provider) SearchLocations(ctx context.Context, query string) ([]prayer.L
goqu.I("ascii_name"),
goqu.COALESCE(goqu.I("alternate_names"), "").As("alternate_names"),
goqu.I("country_code"),
goqu.I("timezone"),
goqu.I("latitude"),
goqu.I("longitude"),
goqu.V(0).As("distance_sq"),
@@ -96,6 +98,7 @@ func (p Provider) SearchLocations(ctx context.Context, query string) ([]prayer.L
ASCIIName: row.ASCIIName,
AlternateNames: row.AlternateNames,
CountryCode: row.CountryCode,
Timezone: row.Timezone,
Latitude: row.Latitude,
Longitude: row.Longitude,
})
@@ -113,6 +116,7 @@ func (p Provider) SearchLocationsByCoords(ctx context.Context, coords prayer.Coo
goqu.I("ascii_name"),
goqu.COALESCE(goqu.I("alternate_names"), "").As("alternate_names"),
goqu.I("country_code"),
goqu.I("timezone"),
goqu.I("latitude"),
goqu.I("longitude"),
goqu.L(
@@ -142,6 +146,7 @@ func (p Provider) SearchLocationsByCoords(ctx context.Context, coords prayer.Coo
ASCIIName: row.ASCIIName,
AlternateNames: row.AlternateNames,
CountryCode: row.CountryCode,
Timezone: row.Timezone,
Latitude: row.Latitude,
Longitude: row.Longitude,
})