mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 04:34:15 -04:00
[pl][census] fixes
This commit is contained in:
parent
74cffd52d3
commit
ffe797b01a
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user