[pl][census] fixes
This commit is contained in:
parent
1bc3e224ed
commit
a52475f644
|
@ -20,8 +20,8 @@
|
|||
<ol>
|
||||
<li v-for="(question, i) in config.census.questions">
|
||||
<p>{{question.question}}</p>
|
||||
<p><strong>{{queue.next.answers[i.toString()]}}</strong></p>
|
||||
<p v-if="queue.next.writins[i.toString()]"><strong><em>{{queue.next.writins[i.toString()]}}</em></strong></p>
|
||||
<p v-if="queue.next.answers[i.toString()]" :class="question.type === 'textarea' ? 'bg-primary text-white p-2 rounded' : ''"><strong>{{queue.next.answers[i.toString()]}}</strong></p>
|
||||
<p v-if="queue.next.writins[i.toString()]" class="bg-primary text-white p-2 rounded"><strong><em>{{queue.next.writins[i.toString()]}}</em></strong></p>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
@ -69,9 +69,14 @@ router.post('/census/submit', handleErrorAsync(async (req, res) => {
|
|||
}));
|
||||
|
||||
router.get('/census/count', handleErrorAsync(async (req, res) => {
|
||||
// if (!req.isGranted('census')) {
|
||||
// return res.status(401).json({error: 'Unauthorised'});
|
||||
// }
|
||||
if (!req.isGranted('census')) {
|
||||
return res.json({
|
||||
all: 0,
|
||||
nonbinary: 0,
|
||||
usable: 0,
|
||||
awaiting: 0,
|
||||
});
|
||||
}
|
||||
|
||||
// duplication reason: https://github.com/felixfbecker/node-sql-template-strings/issues/71
|
||||
|
||||
|
|
Reference in New Issue