package card_info_apple

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

	"kami/api/card_info_apple/v1"
)

func (c *ControllerV1) CardInfoUpdate(ctx context.Context, req *v1.CardInfoUpdateReq) (res *v1.CardInfoUpdateRes, err error) {
	appleAccountService := service.AppleAccount()
	err = appleAccountService.Update(ctx, &model.V1CardAppleAccountInfo{
		CommonStrId:        req.CommonStrId,
		AppleAccountRecord: req.AppleAccountRecord,
		Status:             int(consts.AppleAccountNormal),
	}, nil)
	return
}
