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
}
