// routes/watchlist.js
const router = require("express").Router();
const ctrl   = require("../controllers/watchlistController");
const { authenticate } = require("../middleware/auth");

router.get("/overview",            authenticate, ctrl.getWatchlist);
router.post("/items",              authenticate, ctrl.addItem);
router.delete("/items/:id",        authenticate, ctrl.removeItem);

router.post("/alerts",             authenticate, ctrl.createAlert);
router.patch("/alerts/:id/toggle", authenticate, ctrl.toggleAlert);
router.delete("/alerts/:id",       authenticate, ctrl.deleteAlert);

router.post("/lists",              authenticate, ctrl.createList);

module.exports = router;