From dd2642cf9b012e4006dd14eafbaf85a4f62c110d Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 18 Apr 2019 00:58:34 -0500 Subject: Use a form for adding members and redirect after form submission so that the list of members is displayed and not json output. --- routes/api/members.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'routes/api/members.js') diff --git a/routes/api/members.js b/routes/api/members.js index f1498ae..36b66aa 100644 --- a/routes/api/members.js +++ b/routes/api/members.js @@ -33,7 +33,8 @@ router.post('/', (req, res) => { } members.push(newMember); - res.json(members); + //res.json(members); + res.redirect('/nodejs'); }); // Updat Member -- cgit v1.2.3-54-g00ecf