package cn.reghao.tnb.content.app.vod.controller;

import cn.reghao.jutil.jdk.web.result.Result;
import cn.reghao.tnb.common.web.WebResult;
import cn.reghao.tnb.content.app.vod.model.dto.VideoErrorReport;
import cn.reghao.tnb.content.app.vod.service.VideoEditService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @author reghao
 * @date 2025-08-02 20:12:33
 */
@Tag(name = "视频稿件编辑接口")
@RestController
@RequestMapping("/api/content/video/edit")
public class VideoEditController {
    private final VideoEditService videoEditService;

    public VideoEditController(VideoEditService videoEditService) {
        this.videoEditService = videoEditService;
    }

    @Operation(summary = "视频报错", description = "N")
    @PostMapping("/report")
    public String errorReport(@RequestBody @Validated VideoErrorReport videoErrorReport) {
        Result result = videoEditService.errorReport(videoErrorReport);
        return WebResult.result(result);
    }
}
