Showing
1 changed file
with
2 additions
and
4 deletions
| ... | @@ -20,15 +20,13 @@ router.post('/update', function(req, res, next) { | ... | @@ -20,15 +20,13 @@ router.post('/update', function(req, res, next) { |
| 20 | console.log("updating user failed"); | 20 | console.log("updating user failed"); |
| 21 | next(err); | 21 | next(err); |
| 22 | } else { | 22 | } else { |
| 23 | - console.log("user updated successfully"); | 23 | + res.status(200).send('update'); |
| 24 | - res.redirect('back'); | ||
| 25 | } | 24 | } |
| 26 | }); | 25 | }); |
| 27 | } | 26 | } |
| 28 | else | 27 | else |
| 29 | { | 28 | { |
| 30 | - console.log("password not match"); | 29 | + res.status(404).send(err); |
| 31 | - res.redirect('back'); | ||
| 32 | } | 30 | } |
| 33 | }); | 31 | }); |
| 34 | 32 | ... | ... |
-
Please register or login to post a comment