package activity

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

	"server/api/activity/v1"
)

func (c *ControllerV1) RuleSetStatus(ctx context.Context, req *v1.RuleSetStatusReq) (res *v1.RuleSetStatusRes, err error) {
	out, err := service.SignInRewardRules().SetStatus(ctx, &model.SignInRewardRulesSetStatusIn{
		Id:     req.Id,
		Status: req.Status,
	})
	if err != nil {
		return nil, err
	}
	return &v1.RuleSetStatusRes{Success: out.Success}, nil
}
