package com.zanxiang.game.module.manage.controller.api;

import com.zanxiang.module.oss.pojo.OssUploadCallback;
import com.zanxiang.module.oss.pojo.dto.OssUploadDTO;
import com.zanxiang.module.oss.service.IOssService;
import com.zanxiang.module.util.pojo.ResultVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : lingfeng
 * @time : 2023-06-27
 * @description : oss回调api
 */
@RestController
@RequestMapping("/api/oss")
@Slf4j
public class OssCallBackApi {

    @Autowired
    private IOssService ossService;

    @PostMapping("/callback")
    public ResultVO<OssUploadCallback> ossCallback(@RequestBody OssUploadDTO dto) {
        return ResultVO.ok(ossService.callback(dto));
    }
}
