Skip to content

Commit c2b1eab

Browse files
committed
Fix max_views allowing one too many views
Signed-off-by: Lilly Rose Berner <[email protected]>
1 parent c0504cd commit c2b1eab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

echo/src/database/pastes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl Paste {
4040
pastes
4141
WHERE
4242
id = $1 AND
43-
CASE WHEN max_views IS NULL THEN true ELSE views <= max_views END AND
43+
CASE WHEN max_views IS NULL THEN true ELSE views < max_views END AND
4444
CASE WHEN expires_at IS NULL THEN true ELSE expires_at > CURRENT_TIMESTAMP END
4545
",
4646
match password {

0 commit comments

Comments
 (0)