mirror of
https://github.com/Such-Software/medusa-plugin-blog.git
synced 2026-12-01 11:53:58 +01:00
change api route for getting posts by category
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ export default (rootDirectory: string): Router | Router[] => {
|
||||
})
|
||||
|
||||
// GET ALL BLOG POSTS BY CATEGORY
|
||||
router.get("/store/blog/category-posts/:handle", cors(storeCorsOptions), async (req, res) => {
|
||||
router.get("/store/blog/category/:handle/posts", cors(storeCorsOptions), async (req, res) => {
|
||||
const blogService = req.scope.resolve("blogService")
|
||||
blogService.getBlogPostsByCategoryHandle(req.params.handle).then((blog_posts) => {
|
||||
return res.json(blog_posts)
|
||||
|
||||
Reference in New Issue
Block a user