package com.ruoyi.controller;

import com.ruoyi.annotations.UserLoginToken;
import com.ruoyi.controller.req.ReportReq;
import com.ruoyi.frequency.report.service.ReportService;
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 ApiReportController extends RyController {

    @Autowired
    private ReportService reportService;

    @PostMapping("/report")
    @UserLoginToken
    @ApiOperation(value = "举报", notes = "举报")
    public ResponseData report(@RequestBody ReportReq req) {
        return reportService.report(req,getUserVo());
    }
}
