const { getReqInformation } = require("../../utils/Common");

const index = async (req, res) => {
  let user = req.session?.user ?? {};
  let { baseUrl, endPoint } = getReqInformation(req);
  return res.render("blog/index.ejs", { baseUrl, endPoint, user });
};

const getById = async (req, res) => {
  let user = req.session?.user ?? {};
  let { baseUrl, endPoint } = getReqInformation(req);
  return res.render("blog/blog-by-id.ejs", { baseUrl, endPoint, user });
};

module.exports = {
  index,
  getById,
};
