package card_info_t_mall_game

import (
	"context"
	"kami/internal/errHandler"
	"kami/internal/model"
	"kami/internal/service"

	"kami/api/card_info_t_mall_game/v1"

	"github.com/gogf/gf/v2/errors/gcode"
)

func (c *ControllerV1) TMallGameAccountToggle(ctx context.Context, req *v1.TMallGameAccountToggleReq) (res *v1.TMallGameAccountToggleRes, err error) {
	accountService := service.RechargeTMallGameAccount()
	err = accountService.Toggle(ctx, &model.RechargeTMallGameAccountToggleInput{
		TMallGameAccountToggleReq: req,
	})
	err = errHandler.WrapError(ctx, gcode.CodeInternalError, err)
	return
}
