change api route for getting posts by category

This commit is contained in:
Lacey Pevey
2023-05-16 11:17:47 -05:00
parent 6046366afc
commit 2b7e9ce077
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -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)