diff --git a/src/libs/routes_v1/activity.js b/src/libs/routes_v1/activity.js index 19c4f9149c8cc871eeb95f0afb4a0766b66e3480..1c00ced76b5c2fddbed61d58d7b7966b0a172cec 100644 --- a/src/libs/routes_v1/activity.js +++ b/src/libs/routes_v1/activity.js @@ -115,6 +115,11 @@ activityApp.get('/:id', (req, res, next) => { res.json({ msg: "A atividade não está cadastrada" }); } else { let actJSON = act.toJSON(); + //transform data yyyy-mm-dd to dd/mm/yyyy + let date = actJSON.date.split('-'); + let date_headline = actJSON.date_headline.split('-'); + actJSON.date = date[2] + '/' + date[1] + '/' + date[0]; + actJSON.date_headline = date_headline[2] + '/' + date_headline[1] + '/' + date_headline[0]; req.result = actJSON; next(); }