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

Function GetSyncableChannels

controller/ratio_sync.go:447–474  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

445}
446
447func GetSyncableChannels(c *gin.Context) {
448 channels, err := model.GetAllChannels(0, 0, true, false)
449 if err != nil {
450 c.JSON(http.StatusOK, gin.H{
451 "success": false,
452 "message": err.Error(),
453 })
454 return
455 }
456
457 var syncableChannels []dto.SyncableChannel
458 for _, channel := range channels {
459 if channel.GetBaseURL() != "" {
460 syncableChannels = append(syncableChannels, dto.SyncableChannel{
461 ID: channel.Id,
462 Name: channel.Name,
463 BaseURL: channel.GetBaseURL(),
464 Status: channel.Status,
465 })
466 }
467 }
468
469 c.JSON(http.StatusOK, gin.H{
470 "success": true,
471 "message": "",
472 "data": syncableChannels,
473 })
474}

Callers

nothing calls this directly

Calls 3

GetAllChannelsFunction · 0.92
ErrorMethod · 0.80
GetBaseURLMethod · 0.80

Tested by

no test coverage detected