package com.red.circle.other.app.inner.endpoint.material.props;

import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.other.app.inner.service.material.props.PropsToolClientService;
import com.red.circle.other.inner.endpoint.material.props.api.PropsToolClientApi;
import com.red.circle.other.inner.model.cmd.material.PrizeDescribeRewardCmd;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 道具资源服务.
 *
 * @author pengliang on 2023/6/3
 */
@Validated
@RestController
@RequestMapping(value = PropsToolClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class PropsToolClientEndpoint implements PropsToolClientApi {

  private final PropsToolClientService propsToolClientService;

  @Override
  public ResultResponse<Void> sendProps(PrizeDescribeRewardCmd cmd) {
    propsToolClientService.sendProps(cmd);
    return ResultResponse.success();
  }

}
