From 8a6fff61ae9b481b9523d7228ef4dd593726f433 Mon Sep 17 00:00:00 2001 From: bnkai <48220860+bnkai@users.noreply.github.com> Date: Fri, 3 Apr 2020 06:40:37 +0300 Subject: [PATCH] Enable sorting for galleries (#437) --- pkg/models/querybuilder_gallery.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/models/querybuilder_gallery.go b/pkg/models/querybuilder_gallery.go index 02913a44a..73c4ff854 100644 --- a/pkg/models/querybuilder_gallery.go +++ b/pkg/models/querybuilder_gallery.go @@ -139,13 +139,13 @@ func (qb *GalleryQueryBuilder) Query(findFilter *FindFilterType) ([]*Gallery, in func (qb *GalleryQueryBuilder) getGallerySort(findFilter *FindFilterType) string { var sort string var direction string - //if findFilter == nil { // TODO temp until title is removed from schema and UI - sort = "path" - direction = "ASC" - //} else { - // sort = findFilter.getSort("path") - // direction = findFilter.getDirection() - //} + if findFilter == nil { + sort = "path" + direction = "ASC" + } else { + sort = findFilter.GetSort("path") + direction = findFilter.GetDirection() + } return getSort(sort, direction, "galleries") }