You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

50 lines
964 B

package http
import (
"go-common/app/interface/bbq/app-bbq/api/http/v1"
topic "go-common/app/service/bbq/topic/api"
bm "go-common/library/net/http/blademaster"
"github.com/pkg/errors"
)
func topicDetail(c *bm.Context) {
arg := new(topic.TopicVideosReq)
if err := c.Bind(arg); err != nil {
errors.Wrap(err, "参数验证失败")
return
}
mid := int64(0)
midValue, exists := c.Get("mid")
if exists {
mid = midValue.(int64)
}
c.JSON(srv.TopicDetail(c, mid, arg))
}
func discoveryList(c *bm.Context) {
arg := new(v1.DiscoveryReq)
if err := c.Bind(arg); err != nil {
errors.Wrap(err, "参数验证失败")
return
}
mid := int64(0)
midValue, exists := c.Get("mid")
if exists {
mid = midValue.(int64)
}
c.JSON(srv.Discovery(c, mid, arg))
}
func topicSearch(c *bm.Context) {
arg := new(v1.TopicSearchReq)
if err := c.Bind(arg); err != nil {
errors.Wrap(err, "参数验证失败")
return
}
c.JSON(srv.TopicSearch(c, arg))
}