Browse Source

fix(api): Change tag to alphabetical sorting

Fixes: #108
lejianwen 1 year ago
parent
commit
7c528facf9
1 changed files with 1 additions and 0 deletions
  1. 1 0
      service/tag.go

+ 1 - 0
service/tag.go

@@ -29,6 +29,7 @@ func (s *TagService) ListByUserId(userId uint) (res *model.TagList) {
29 29
 func (s *TagService) ListByUserIdAndCollectionId(userId, cid uint) (res *model.TagList) {
30 30
 	res = s.List(1, 1000, func(tx *gorm.DB) {
31 31
 		tx.Where("user_id = ? and collection_id = ?", userId, cid)
32
+		tx.Order("name asc")
32 33
 	})
33 34
 	return
34 35
 }