Commit eb980bf0 authored by antoine masson's avatar antoine masson
Browse files

v1.01

-Fix bug in survey poc
- New translation 
parent 81fa2bf7
...@@ -528,7 +528,8 @@ exports.getSurveykey = async (req, res) => { ...@@ -528,7 +528,8 @@ exports.getSurveykey = async (req, res) => {
exports.getSurveyInfo= async (req, res) => { exports.getSurveyInfo= async (req, res) => {
try { try {
const survey = await Survey.findById(req.userData.survey_id ); const survey = await Survey.findById(req.userData.survey_id);
const poc = await survey.poc
let surveygeneral = survey.general; let surveygeneral = survey.general;
let languages = [] let languages = []
...@@ -542,8 +543,7 @@ exports.getSurveyInfo= async (req, res) => { ...@@ -542,8 +543,7 @@ exports.getSurveyInfo= async (req, res) => {
// const opt = await GlobalOptions.findById(0,{poc:1}); // const opt = await GlobalOptions.findById(0,{poc:1});
// poc = opt.poc; // poc = opt.poc;
// } // }
const info = {poc:poc,languages:languages,externalurl:surveygeneral.externalurl}
const info = {poc:survey.poc,languages:languages,externalurl:surveygeneral.externalurl}
await res.status(201).json({payload:info,message:"info",status:"OK"}); await res.status(201).json({payload:info,message:"info",status:"OK"});
} catch (err) { } catch (err) {
res.status(400).json({ message: err,status:"Error"}); res.status(400).json({ message: err,status:"Error"});
......
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment