fix(api): Change tag to alphabetical sorting

Fixes: #108
This commit is contained in:
lejianwen
2025-01-20 13:07:41 +08:00
parent f8548a6589
commit 7c528facf9

View File

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