package activity

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

	"server/api/activity/v1"
)

func (c *ControllerV1) RuleDel(ctx context.Context, req *v1.RuleDelReq) (res *v1.RuleDelRes, err error) {
	out, err := service.SignInRewardRules().Delete(ctx, &model.SignInRewardRulesDeleteIn{
		Id: req.Id,
	})
	if err != nil {
		return nil, err
	}
	return &v1.RuleDelRes{Success: out.Success}, nil
}
