const { getAllPhotos, getVideos, getCondolence } = require("../utils/getQuery");

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

// Get All Gallery Photo
router.get("/allphotos", async (req, res) => {
  try {
    const data = await getAllPhotos();
    res.status(200).json(data);
  } catch (error) {
    res.status(500).json(error);
  }
});

// Get All Gallery Video
router.get("/allvideos", async (req, res) => {
  try {
    const data = await getVideos();
    res.status(200).json(data);
  } catch (error) {
    res.status(500).json(error);
  }
});

// Get Condolence
router.get("/condolence", async (req, res) => {
  try {
    const data = await getCondolence();
    res.status(200).json(data);
  } catch (error) {
    res.status(500).json(error);
  }
});

module.exports = router;
