We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 91b6aee + ca50672 commit 5a69072Copy full SHA for 5a69072
src/poll/poll.service.ts
@@ -78,17 +78,17 @@ export class PollService {
78
const skip = (page - 1) * limit;
79
const now = new Date();
80
const filters: any = {};
81
- if (isActive) {
+ if (isActive === true) {
82
filters.startDate = { lte: now };
83
filters.endDate = { gt: now };
84
}
85
- if (userCreated) {
+ if (userCreated === true) {
86
filters.authorUserId = userId;
87
88
89
// Get polls user voted in
90
let votedPollIds: number[] = [];
91
- if (userVoted) {
+ if (userVoted === true) {
92
const userVotes = await this.databaseService.vote.findMany({
93
where: { userId },
94
select: { pollId: true },
0 commit comments