feat:增加一个作品列表接口
This commit is contained in:
parent
49caaa73c6
commit
e6ca737fb1
@ -47,6 +47,7 @@ func MediaRouter(r *gin.RouterGroup) {
|
|||||||
work.POST("remind", serviceCast.Remind)
|
work.POST("remind", serviceCast.Remind)
|
||||||
work.POST("publish-info", serviceCast.PublishInfo)
|
work.POST("publish-info", serviceCast.PublishInfo)
|
||||||
work.POST("import-batch", serviceCast.ImportWorkBatch)
|
work.POST("import-batch", serviceCast.ImportWorkBatch)
|
||||||
|
work.POST("list-published", serviceCast.WorkListPublished)
|
||||||
}
|
}
|
||||||
|
|
||||||
script := auth.Group("script")
|
script := auth.Group("script")
|
||||||
|
|||||||
@ -1805,3 +1805,24 @@ func checkAndReuploadImage(imageUrl string, mediaType string) (string, error) {
|
|||||||
}
|
}
|
||||||
return compressUrl, nil
|
return compressUrl, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WorkListPublished 获取已发布的作品列表
|
||||||
|
func WorkListPublished(ctx *gin.Context) {
|
||||||
|
var (
|
||||||
|
req *cast.WorkListPublishedReq
|
||||||
|
resp *cast.WorkListPublishedResp
|
||||||
|
)
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
resp, err = service.CastProvider.WorkListPublished(newCtx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user