Make QueryOptions optional in AlbumRepository.GetStarred

This commit is contained in:
Deluan
2020-01-11 21:30:24 -05:00
parent d4ed6a0569
commit b85898df93
5 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -79,7 +79,7 @@ func (r *stormRepository) purgeInactive(activeList interface{}) (deleted []strin
return deleted, nil
}
func (r *stormRepository) execute(matcher q.Matcher, result interface{}, options ...*domain.QueryOptions) error {
func (r *stormRepository) execute(matcher q.Matcher, result interface{}, options ...domain.QueryOptions) error {
query := Db().Select(matcher)
if len(options) > 0 {
query = addQueryOptions(query, options[0])
@@ -118,7 +118,7 @@ func stormOptions(options ...domain.QueryOptions) func(*index.Options) {
}
}
func addQueryOptions(q storm.Query, o *domain.QueryOptions) storm.Query {
func addQueryOptions(q storm.Query, o domain.QueryOptions) storm.Query {
if o.SortBy != "" {
q = q.OrderBy(o.SortBy)
}