书籍列表接口新增参数
This commit is contained in:
21
internal/controller/author/author_v1_review.go
Normal file
21
internal/controller/author/author_v1_review.go
Normal file
@ -0,0 +1,21 @@
|
||||
package author
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"server/internal/model"
|
||||
"server/internal/service"
|
||||
|
||||
v1 "server/api/author/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) Review(ctx context.Context, req *v1.ReviewReq) (res *v1.ReviewRes, err error) {
|
||||
out, err := service.Author().Review(ctx, &model.AuthorReviewIn{
|
||||
AuthorId: req.AuthorId,
|
||||
Status: req.Status,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &v1.ReviewRes{Success: out.Success}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user