Skip to content

Commit 489d7ea

Browse files
committed
fix: correct voting start date and properly await home ownership check.
1 parent adee848 commit 489d7ea

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

api/src/controllers/vote.controller.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class VoteController {
1515
) { }
1616

1717
// Voting starts on March 23, 2026 at 12:00 AM EDT
18-
public static readonly VOTING_START_DATE = new Date('2026-03-22T12:00:00-04:00');
18+
public static readonly VOTING_START_DATE = new Date('2026-03-20T12:00:00-04:00');
1919
// Voting ends on March 30, 2026 at 11:59 PM EDT
2020
public static readonly VOTING_END_DATE = new Date('2026-03-30T23:59:59-04:00');
2121
// created date for new members to be eligible to vote
@@ -61,7 +61,8 @@ class VoteController {
6161
}
6262

6363
// Check if user owns a home
64-
if (!this.homeService.getHome(session.id)) {
64+
const home = await this.homeService.getHome(session.id);
65+
if (!home) {
6566
return res.status(403).json({ error: 'Owning a home is required to vote' });
6667
}
6768

@@ -127,7 +128,8 @@ class VoteController {
127128
}
128129

129130
// Check if user owns a home
130-
if (!this.homeService.getHome(session.id)) {
131+
const home = await this.homeService.getHome(session.id);
132+
if (!home) {
131133
return res.status(403).json({ error: 'Owning a home is required to vote' });
132134
}
133135

0 commit comments

Comments
 (0)