package recommend

import (
	"context"
	"server/internal/model"
	"server/internal/service"

	v1 "server/api/recommend/v1"
)

func (c *ControllerV1) SetStatus(ctx context.Context, req *v1.SetStatusReq) (res *v1.SetStatusRes, err error) {
	out, err := service.BookRecommendations().SetStatus(ctx, &model.BookRecommendationsSetStatusIn{
		Id:     req.Id,
		Status: req.Status,
	})
	if err != nil {
		return nil, err
	}
	return &v1.SetStatusRes{Success: out.Success}, nil
}
