feat: 互动处理
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user