10 lines
332 B
JavaScript
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; |