I have 2 different methods that I want to be called when a specific form is filled. I know that I can't have a form with 2 actions so I am just wondering can I call 2 different methods on the same route in Node.js?
I need something like this
router.post('/webmark/addcollection', webmarks.addCollection);
router.post('/webmark/addcollection', webmarks.uploadPicture);
so basically when the button in the form is pressed, the action would redirect to the specific route and the 2 methods would be called.
uploadPictureinside theaddCollection?next()function in first route solve your problem