mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-25 14:09:03 -04:00
#180 [census] export - clearer output
This commit is contained in:
parent
ac6901b479
commit
925127cf20
@ -95,13 +95,13 @@ router.get('/census/export', async (req, res) => {
|
||||
for (let question of config.census.questions) {
|
||||
if (question.type === 'checkbox') {
|
||||
for (let [option, comment] of question.options) {
|
||||
answer[`${i}_${option}`] = (answers[i.toString()] || []).includes(option);
|
||||
answer[`${i}_${option}`] = (answers[i.toString()] || []).includes(option) ? 1 : '';
|
||||
}
|
||||
} else {
|
||||
answer[`${i}_`] = answers[i.toString()] || '';
|
||||
}
|
||||
if (question.writein) {
|
||||
answer[`${i}__writein`] = writins[i.toString()] || '';;
|
||||
answer[`${i}__writein`] = writins[i.toString()] || '';
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user