Fix album lists, to use annotations
This commit is contained in:
@@ -26,6 +26,9 @@ func (r *sqlRepository) newQuery(options ...model.QueryOptions) orm.QuerySeter {
|
||||
q = q.OrderBy(opts.Sort)
|
||||
}
|
||||
}
|
||||
for field, value := range opts.Filters {
|
||||
q = q.Filter(field, value)
|
||||
}
|
||||
}
|
||||
return q
|
||||
}
|
||||
@@ -46,9 +49,6 @@ func (r *sqlRepository) newRawQuery(options ...model.QueryOptions) squirrel.Sele
|
||||
sq = sq.OrderBy(options[0].Sort)
|
||||
}
|
||||
}
|
||||
for field, value := range options[0].Filters {
|
||||
sq = sq.Where(squirrel.Like{field: value.(string) + "%"})
|
||||
}
|
||||
}
|
||||
return sq
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user