feat: 互动处理

This commit is contained in:
Blizzard
2026-03-05 16:54:25 +08:00
parent 74b252550b
commit 2583b5f302
30 changed files with 412 additions and 119 deletions
+8
View File
@@ -54,6 +54,10 @@ func (a *ChannelApi) GetFreeChannelList(c *gin.Context) {
// @Router /radio/channel/list [post]
func (a *ChannelApi) GetChannelList(c *gin.Context) {
userId := auth.GetUserId(c)
if userId == "" || userId == "0" {
response.FailWithMsg("用户未登录", c)
return
}
var req request.GetChannelList
err := c.ShouldBindJSON(&req)
if err != nil {
@@ -86,6 +90,10 @@ func (a *ChannelApi) GetChannelList(c *gin.Context) {
// @Router /radio/channel/detail [get]
func (a *ChannelApi) GetChannelDetail(c *gin.Context) {
userId := auth.GetUserId(c)
if userId == "" || userId == "0" {
response.FailWithMsg("用户未登录", c)
return
}
id := c.Query("id")
if id == "" {
response.FailWithMsg("参数错误: id不能为空", c)