fix: 渠道标签开启下使用ID排序出错

This commit is contained in:
CalciumIon
2024-12-09 20:38:03 +08:00
parent 2c79811cb1
commit 56ccb30a94
3 changed files with 16 additions and 9 deletions

View File

@@ -63,7 +63,7 @@ func GetAllChannels(c *gin.Context) {
}
for _, tag := range tags {
if tag != nil && *tag != "" {
tagChannel, err := model.GetChannelsByTag(*tag)
tagChannel, err := model.GetChannelsByTag(*tag, idSort)
if err == nil {
channelData = append(channelData, tagChannel...)
}
@@ -181,7 +181,7 @@ func SearchChannels(c *gin.Context) {
}
for _, tag := range tags {
if tag != nil && *tag != "" {
tagChannel, err := model.GetChannelsByTag(*tag)
tagChannel, err := model.GetChannelsByTag(*tag, idSort)
if err == nil {
channelData = append(channelData, tagChannel...)
}