MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / GetChannelsByTag

Function GetChannelsByTag

model/channel.go:254–262  ·  view source on GitHub ↗
(tag string, idSort bool)

Source from the content-addressed store, hash-verified

252}
253
254func GetChannelsByTag(tag string, idSort bool) ([]*Channel, error) {
255 var channels []*Channel
256 order := "priority desc"
257 if idSort {
258 order = "id desc"
259 }
260 err := DB.Where("tag = ?", tag).Order(order).Find(&channels).Error
261 return channels, err
262}
263
264func SearchChannels(keyword string, group string, model string, idSort bool) ([]*Channel, error) {
265 var channels []*Channel

Callers 4

GetAllChannelsFunction · 0.92
SearchChannelsFunction · 0.92
GetTagModelsFunction · 0.92
EditChannelByTagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected