Node/modules/comments/routes/get.js
Batuhan Coşkun c3d2ebd4a8 güncelleme
2025-04-04 10:39:01 +03:00

10 lines
332 B
JavaScript

const express = require("express");
const auth = require("../../logins/middlewares/auth");
const { getComments } = require("../middlewares/get");
const router = express();
router.get("/get/comments/:postid", auth, async function(req, res){
res.json(await getComments({postId: req.params.postid}));
});
module.exports = router;