diff --git a/app/plus/service.ts b/app/plus/service.ts index 34207b48d..f8169ae3b 100644 --- a/app/plus/service.ts +++ b/app/plus/service.ts @@ -403,6 +403,8 @@ const addVotes = async ({ input: z.infer; userId: number; }) => { + if (!getVotingRange().isHappening) + throw httpError.badRequest("voting is not happening right now"); const [plusStatuses, suggestions] = await Promise.all([ prisma.plusStatus.findMany({}), prisma.plusSuggestion.findMany({ where: { isResuggestion: false } }),