feat: 互动处理
This commit is contained in:
@@ -24,6 +24,10 @@ type SubscriptionApi struct{}
|
||||
// @Router /radio/subscription/list [post]
|
||||
func (a *SubscriptionApi) GetSubscriptionList(c *gin.Context) {
|
||||
userId := auth.GetUserId(c)
|
||||
if userId == "" || userId == "0" {
|
||||
response.FailWithMsg("用户未登录", c)
|
||||
return
|
||||
}
|
||||
var req common.PageInfo
|
||||
err := c.ShouldBindJSON(&req)
|
||||
if err != nil {
|
||||
@@ -60,6 +64,10 @@ func (a *SubscriptionApi) UnlockChannel(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
userId := auth.GetUserId(c)
|
||||
if userId == "" || userId == "0" {
|
||||
response.FailWithMsg("用户未登录", c)
|
||||
return
|
||||
}
|
||||
res, no, err := subscriptionService.UnlockChannel(userId, req)
|
||||
if err != nil {
|
||||
global.Logger.Error("解锁频道失败!", zap.Error(err))
|
||||
|
||||
Reference in New Issue
Block a user