import express from "express";
import { getReports, getFiveNewReports, getReportById, getReportByUserId, userReport } from "../../controllers/usersControllers/report.js";
import { verifyLoginUser, adminOnly } from "../../middlewares/User/authUser.js";

const router = express.Router();

router.get("/report", verifyLoginUser, adminOnly, getReports);

router.get("/report/new", verifyLoginUser, adminOnly, getFiveNewReports);

router.get("/report/user/:id", verifyLoginUser, adminOnly, getReportByUserId);

router.get("/report/:id", verifyLoginUser, adminOnly, getReportById);

router.post("/report", verifyLoginUser, userReport);

export default router