skip to Main Content

Javascript – Node.js Express: Unexpected behavior when calling /newblogs endpoint

This is the code I was working on: import express from 'express' import * as blogControler from '../controler/blogControler.js' import * as authControler from '../controler/authControler.js' const blogRouter= express.Router() blogRouter.use(authControler.isVerified) blogRouter.route('/allblogs').get(blogControler.showallblogs) blogRouter.route('/:id').get(blogControler.find_blog) blogRouter.route('/newblogs').get(blogControler.newpost) export default blogRouter; When I tried to hit /newblogs…

VIEW QUESTION
Back To Top
Search