Skip to content

Commit

Permalink
only submitted applications are viewable by reviewers
Browse files Browse the repository at this point in the history
  • Loading branch information
KavikaPalletenne committed Dec 2, 2024
1 parent efe6c00 commit 02b705b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/server/src/models/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl Application {
FROM applications a
JOIN users u ON u.id = a.user_id
JOIN campaigns c ON c.id = a.campaign_id
WHERE a.id = $1 AND (a.submitted = true OR c.ends_at <= CURRENT_TIMESTAMP)
WHERE a.id = $1 AND a.submitted = true
",
id
)
Expand Down Expand Up @@ -207,7 +207,7 @@ impl Application {
JOIN users u ON u.id = a.user_id
JOIN application_roles ar on ar.application_id = a.id
JOIN campaigns c on c.id = a.campaign_id
WHERE ar.id = $1 AND (a.submitted = true OR c.ends_at <= CURRENT_TIMESTAMP)
WHERE ar.id = $1 AND a.submitted = true
",
role_id
)
Expand Down Expand Up @@ -273,7 +273,7 @@ impl Application {
FROM applications a
JOIN users u ON u.id = a.user_id
JOIN campaigns c ON c.id = a.campaign_id
WHERE a.campaign_id = $1 AND (a.submitted = true OR c.ends_at <= CURRENT_TIMESTAMP)
WHERE a.campaign_id = $1 AND a.submitted = true
",
campaign_id
)
Expand Down

0 comments on commit 02b705b

Please sign in to comment.