From b271217f1050c0d3ca0c5706e322889f879b7dce Mon Sep 17 00:00:00 2001 From: Somnath More Date: Thu, 11 Oct 2018 17:51:55 +0530 Subject: [PATCH] Added post call for new employee --- EmployeeDB/app.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/EmployeeDB/app.js b/EmployeeDB/app.js index 39506a41..60a75cd8 100644 --- a/EmployeeDB/app.js +++ b/EmployeeDB/app.js @@ -50,6 +50,14 @@ app.get('/employee/new', function(req, res) { }); }); + +//new employee with post +app.post('/employee/new', function(req, res) { + res.render('employee_new', { + title: 'New Employee' + }); +}); + //save new employee app.post('/employee/new', function(req, res){ employeeProvider.save({