mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 11:57:34 -07:00
Refactor
This commit is contained in:
parent
491d1c01ad
commit
b842b26bf0
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ export async function createNote(value: any, resolver?: Resolver, silent = false
|
||||||
|
|
||||||
// vote
|
// vote
|
||||||
if (reply && reply.hasPoll) {
|
if (reply && reply.hasPoll) {
|
||||||
const poll = await Polls.findOne({ noteId: reply.id }).then(ensure);
|
const poll = await Polls.findOne(reply.id).then(ensure);
|
||||||
|
|
||||||
const tryCreateVote = async (name: string, index: number): Promise<null> => {
|
const tryCreateVote = async (name: string, index: number): Promise<null> => {
|
||||||
if (poll.expiresAt && Date.now() > new Date(poll.expiresAt).getTime()) {
|
if (poll.expiresAt && Date.now() > new Date(poll.expiresAt).getTime()) {
|
||||||
|
|
Loading…
Reference in a new issue