I am nodejs along with expressjs and in submitting a form a request is made on the server, which, after being treated, redirects the page:
...
Post.create(doc, (err, post) => {
if (err || !post) {
return res.json({
status: 'error',
error: err
});
}
post.save()
res.redirect('/minha-url')
});
...
But the redirection is not done, although in the devTools panel of Chrome, in the networking tab the redirection appears with status 200 as a request.
I do not understand what the problem might be.
Thanks for any help.