Skip to content

Commit 7fdf86e

Browse files
committed
return json for panic endpoint
1 parent a5ae43c commit 7fdf86e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

complete-application/routes/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ router.get('/', function (req, res, next) {
77
});
88

99
router.post('/panic', hasRole(['teller']), function (req, res, next) {
10-
res.send("We've called the police!");
10+
res.json({ message: "We've called the police!" });
1111
});
1212

1313
router.get('/make-change', hasRole(['customer', 'teller']), function (req, res, next) {
@@ -23,4 +23,4 @@ router.get('/make-change', hasRole(['customer', 'teller']), function (req, res,
2323
res.json(result);
2424
});
2525

26-
module.exports = router;
26+
module.exports = router;

0 commit comments

Comments
 (0)