Skip to content
Snippets Groups Projects
Commit fbd69d77 authored by ems19's avatar ems19
Browse files

[ADD] Date final

parent 1b7aca5c
No related branches found
No related tags found
4 merge requests!379homologa -> master,!378dev -> homologa,!375Prd migration,!374Prd migration
...@@ -21,7 +21,11 @@ var Activity = db.define("Activity",{ ...@@ -21,7 +21,11 @@ var Activity = db.define("Activity",{
type: Sequelize.STRING type: Sequelize.STRING
}, },
date:{ date:{
type: Sequelize.STRING, type: Sequelize.DATE,
allowNull:false
},
date_final:{
type: Sequelize.DATE,
allowNull:false allowNull:false
}, },
authors:{ authors:{
......
...@@ -115,8 +115,6 @@ activityApp.get('/:id', (req, res, next) => { ...@@ -115,8 +115,6 @@ activityApp.get('/:id', (req, res, next) => {
res.json({ msg: "A atividade não está cadastrada" }); res.json({ msg: "A atividade não está cadastrada" });
} else { } else {
let actJSON = act.toJSON(); let actJSON = act.toJSON();
actJSON.date = actJSON.date.toLocaleDateString("en-GB");
actJSON.date_headline = actJSON.date_headline.toLocaleDateString("en-GB");
req.result = actJSON; req.result = actJSON;
next(); next();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment