fix: delete ListLatest(func)
This commit is contained in:
@@ -36,7 +36,6 @@ func SetRouter(db *gorm.DB) *gin.Engine {
|
||||
videoGroup := r.Group("/video")
|
||||
{
|
||||
videoGroup.POST("/listByAuthorID", videoHandler.ListByAuthorID)
|
||||
videoGroup.POST("/listLatest", videoHandler.ListLatest)
|
||||
videoGroup.POST("/getDetail", videoHandler.GetDetail)
|
||||
}
|
||||
protectedVideoGroup := videoGroup.Group("")
|
||||
|
||||
@@ -81,15 +81,6 @@ func (vh *VideoHandler) ListByAuthorID(c *gin.Context) {
|
||||
c.JSON(200, videos)
|
||||
}
|
||||
|
||||
func (vh *VideoHandler) ListLatest(c *gin.Context) {
|
||||
videos, err := vh.service.ListLatest(c)
|
||||
if err != nil {
|
||||
c.JSON(400, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
c.JSON(200, videos)
|
||||
}
|
||||
|
||||
func (vh *VideoHandler) GetDetail(c *gin.Context) {
|
||||
var req GetDetailRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user