Skip to content

Commit

Permalink
Merge branch '41/deletar-roteiros' into 'dev'
Browse files Browse the repository at this point in the history
41/deletar roteiros

See merge request !50
  • Loading branch information
thomaspozzer committed Nov 25, 2019
2 parents b479981 + 83a7472 commit e4bb289
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/api/itinerario/itinerarioRest.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ router.post('/', async function (req, res) {
*/
router.get('/', async (req, res) => {
await itinerarioService.buscarItinerarios()
.then(itinerario => res.json(itinerario))
.then((result) => {
res.set('X-Total-Count', result.length);
res.header('Access-Control-Expose-Headers', 'X-Total-Count');
res.status(200);
res.json(result);
})
.catch(e => res.status(e.statusCode).send(e));
});

Expand Down

0 comments on commit e4bb289

Please sign in to comment.