import express from "express";
import {
  getAllContacts,
  getUserContacts,
  submitContact,
  updateContactStatus,
} from "../controllers/contact.js";

const router = express.Router();

// User submits a query
router.post("/", submitContact);

// Admin gets all queries
router.get("/admin", getAllContacts);

// Get queries for a specific user
router.get("/user/:userId", getUserContacts);

// Admin updates query status
router.patch("/admin/:id", updateContactStatus);

export default router;
