feat: allow restful filter customization per field

This commit is contained in:
Deluan
2020-03-19 21:09:57 -04:00
parent 97d95ea794
commit 8cdd4e317d
2 changed files with 24 additions and 5 deletions
+3
View File
@@ -23,6 +23,9 @@ func NewAlbumRepository(ctx context.Context, o orm.Ormer) model.AlbumRepository
r.sortMappings = map[string]string{
"artist": "compilation asc, album_artist asc, name asc",
}
r.filterMappings = map[string]filterFunc{
"compilation": booleanFilter,
}
return r
}