package com.ruoyi.post.controller;

import com.ruoyi.annotations.UserLoginToken;
import com.ruoyi.post.controller.req.PostReportReq;
import com.ruoyi.post.frequency.posreport.service.PostReportService;
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 ApiPostReportController extends RyController {

    @Autowired
    private PostReportService postReportService;

    @PostMapping("/postReport")
    @UserLoginToken
    @ApiOperation(value = "帖子举报", notes = "帖子举报")
    public ResponseData postReport(@RequestBody PostReportReq req) {
        return postReportService.postReport(req,getUserVo());
    }
}
