package recommend

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

	v1 "server/api/recommend/v1"
)

func (c *ControllerV1) Del(ctx context.Context, req *v1.DelReq) (res *v1.DelRes, err error) {
	out, err := service.BookRecommendations().Delete(ctx, &model.BookRecommendationsDeleteIn{
		Id: req.Id,
	})
	if err != nil {
		return nil, err
	}
	return &v1.DelRes{Success: out.Success}, nil
}
