Skip to content

Commit

Permalink
fix stat by facultad and vote by topic
Browse files Browse the repository at this point in the history
  • Loading branch information
xtian7489 committed Oct 8, 2024
1 parent be6e932 commit b9fdedb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api-v2/vote/csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ app.get('/vote/byTopic/csv',
return [
t.id,
`"${escapeTxt(t.mediaTitle)}"`,
auxFacultad ? auxFacultad.nombre : '-',
auxFacultad ? `"${escapeTxt(auxFacultad.nombre)}"` : '-',
mapTopicAndVoteCount[t.id] ? mapTopicAndVoteCount[t.id] : 0,
]
})
Expand Down
4 changes: 4 additions & 0 deletions lib/api/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,16 @@ app.get('/stats/votacion',
...vote.voto1._doc,
author: vote.user,
dni: vote.dni,
facultad: vote.facultad,
claustro: vote.claustro,
user: dniUserMap[vote.dni]
})
if (vote.voto2) votes.push({
...vote.voto2._doc,
author: vote.user,
dni: vote.dni,
facultad: vote.facultad,
claustro: vote.claustro,
user: dniUserMap[vote.dni]
})
})
Expand Down

0 comments on commit b9fdedb

Please sign in to comment.