Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek committed Jan 8, 2024
1 parent 4b657ba commit 2a0b9e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ pub fn get_clip(

clips
.filter(code.eq(clip_code))
.filter(expires_at.is_null().or(expires_at.gt(chrono::Local::now().naive_local())))
.filter(
expires_at
.is_null()
.or(expires_at.gt(chrono::Local::now().naive_local())),
)
.first::<Clip>(connection)
.optional()
}
Expand Down

0 comments on commit 2a0b9e2

Please sign in to comment.