const { getUpcomingSeminar, getPrevSeminar } = require("../utils/getQuery");

const router = require("express").Router();

// Upcoming Seminars
router.get("/upcoming", async (req, res) => {
  try {
    const data = await getUpcomingSeminar();
    res.status(200).json(data);
  } catch (error) {
    res.status(500).json(error);
  }
});

// Previous Seminars
router.get("/previous", async (req, res) => {
  try {
    const data = await getPrevSeminar();
    res.status(200).json(data);
  } catch (error) {
    res.status(500).json(error);
  }
});

module.exports = router;
