diff options
Diffstat (limited to 'storage/category.go')
-rw-r--r-- | storage/category.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/category.go b/storage/category.go index 197b78b..bbb4c86 100644 --- a/storage/category.go +++ b/storage/category.go @@ -112,7 +112,8 @@ func (s *Storage) CategoriesWithFeedCount(userID int64) (model.Categories, error query := `SELECT c.id, c.user_id, c.title, (SELECT count(*) FROM feeds WHERE feeds.category_id=c.id) AS count - FROM categories c WHERE user_id=$1` + FROM categories c WHERE user_id=$1 + ORDER BY c.title ASC` rows, err := s.db.Query(query, userID) if err != nil { |