package com.red.circle.console.app.service.app.sys;

import com.red.circle.framework.core.asserts.ResponseAssert;
import com.red.circle.other.inner.model.cmd.user.SysInviteUserConfigCmd;
import com.red.circle.other.inner.model.dto.user.SysInviteUserConfigDTO;
import com.red.circle.other.inner.endpoint.user.user.InviteUserClient;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author lisizhe 2023/11/9  16:52
 */
@Service
@RequiredArgsConstructor
public class SysInviteUserConfigServiceImpl implements SysInviteUserConfigService {

  private final InviteUserClient inviteUserClient;


  @Override
  public void updateConfig(SysInviteUserConfigCmd config) {
    ResponseAssert.requiredSuccess(inviteUserClient.updateConfig(config));
  }

  @Override
  public SysInviteUserConfigDTO getConfig(String sysOrigin) {
    return ResponseAssert.requiredSuccess(inviteUserClient.getConfig(sysOrigin));
  }

}
