package com.ruoyi.controller;

import com.ruoyi.annotations.UserLoginToken;
import com.ruoyi.controller.req.WorksReportReq;
import com.ruoyi.frequency.worksreport.service.WorksReportService;
import com.ruoyi.response.ResponseData;
import com.ruoyi.vo.RyController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 作品举报相关
 * @author liwenlong
 *
 */
@CrossOrigin
@RestController
@RequestMapping("/api/postReport")
@Api(tags = "作品举报相关")
public class ApiWorksReportController extends RyController {

    @Autowired
    private WorksReportService worksReportService;

    @PostMapping("/worksReport")
    @UserLoginToken
    @ApiOperation(value = "作品举报", notes = "作品举报")
    public ResponseData worksReport(@RequestBody WorksReportReq req) {
        return worksReportService.worksReport(req,getUserVo());
    }
}
