import express from "express";
import upload from "../middlewares/upload.js";
import {
  createTeacherProfile,
  getAllTeachers,
  getTeacherByUserId,
  updateAvailability,
  updateTeacherProfile, // ✅ import add karo
} from "../controllers/teacher.js";

const router = express.Router();

router.post(
  "/",
  upload.fields([{ name: "introVideo" }, { name: "thumbnail" }]),
  createTeacherProfile,
);
router.get("/", getAllTeachers);
router.get("/:userId", getTeacherByUserId);
router.put("/availability", updateAvailability);
router.put(
  "/:id",
  upload.fields([{ name: "introVideo" }, { name: "thumbnail" }]),
  updateTeacherProfile,
); // ✅ add karo

export default router;
