mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-04 17:58:43 +09:00
Refactor
This commit is contained in:
parent
a583939767
commit
fc27890f13
@ -103,7 +103,7 @@ export class NoteRepository extends Repository<Note> {
|
||||
const host = note.userHost;
|
||||
|
||||
async function populatePoll() {
|
||||
const poll = await Polls.findOne({ noteId: note.id }).then(ensure);
|
||||
const poll = await Polls.findOne(note.id).then(ensure);
|
||||
const choices = poll.choices.map(c => ({
|
||||
text: c,
|
||||
votes: poll.votes[poll.choices.indexOf(c)],
|
||||
|
Loading…
Reference in New Issue
Block a user