This commit is contained in:
Darko Luketic
2018-03-29 14:06:57 +02:00
parent 7e83d3fb95
commit 6fe7f5e161
2 changed files with 10 additions and 1 deletions

View File

@ -85,6 +85,7 @@ func (h *Handler) ListData(cx *gin.Context) {
p.LocationQuery.Options = cx.Query("location.options")
}
// int64
if age == "1" {
p.Age = true
p.AgeQuery = repo.DataAgeQuery{}
@ -104,6 +105,7 @@ func (h *Handler) ListData(cx *gin.Context) {
p.AgeQuery.To = to
}
// float64
if price == "1" {
p.Price = true
p.PriceQuery = repo.DataPriceQuery{}
@ -121,6 +123,7 @@ func (h *Handler) ListData(cx *gin.Context) {
p.PriceQuery.To = to
}
// bool
if enabled == "1" {
p.Enabled = true
p.EnabledQuery = repo.DataEnabledQuery{}