You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
384 B

import express from "express";
import {
getAllBlogs,
getBlogById,
createBlog,
updateBlog,
deleteBlog
} from "../controllers/blogController.js"
const router = express.Router();
router.get('/', getAllBlogs);
router.get('/:id', getBlogById);
router.post('/', createBlog);
router.patch('/:id', updateBlog);
router.delete('/:id', deleteBlog);
export default router;