We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ccf0fd0 + 958507c commit 19fa728Copy full SHA for 19fa728
src/poll/Poll.dto.ts
@@ -53,6 +53,7 @@ export class GetPollsDto {
53
worldID?: string;
54
55
@IsOptional()
56
+ @Type(() => Number)
57
@IsInt()
58
@Min(1)
59
page?: number = 1;
src/poll/poll.service.ts
@@ -85,6 +85,9 @@ export class PollService {
85
filters.endDate = { gt: now };
86
}
87
88
+ if (isActive === false) {
89
+ filters.OR = [{ startDate: { gt: now } }, { endDate: { lte: now } }];
90
+ }
91
if ((userCreated || userVoted) && query.worldID) {
92
const user = await this.databaseService.user.findUnique({
93
where: { worldID: query.worldID },
0 commit comments