package activity

import (
	"context"
	v1 "server/api/activity/v1"
	"server/internal/model"
	"server/internal/service"
)

func (c *ControllerV1) ItemList(ctx context.Context, req *v1.ItemListReq) (res *v1.ItemListRes, err error) {
	out, err := service.SignInRewardDetails().List(ctx, &model.SignInRewardDetailListIn{
		RuleId: req.RuleId,
	})
	if err != nil {
		return nil, err
	}
	return &v1.ItemListRes{
		List: out.List,
	}, nil
}
