Compare commits
1 Commits
92b6d6f1dd
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 676f0ca01c |
@@ -30,6 +30,7 @@ impl Sqlite {
|
||||
pub async fn new(config: SqliteConfig) -> anyhow::Result<Self> {
|
||||
let opts = SqliteConnectOptions::from_str(&config.database_url)?
|
||||
.create_if_missing(true)
|
||||
.read_only(false)
|
||||
.disable_statement_logging();
|
||||
|
||||
let pool = SqlitePoolOptions::new().connect_with(opts).await?;
|
||||
|
||||
@@ -107,7 +107,8 @@ pub(super) async fn list_shares(
|
||||
shares
|
||||
WHERE
|
||||
warren_id = $1 AND
|
||||
path = $2
|
||||
path = $2 AND
|
||||
(expires_at IS NULL OR expires_at > CURRENT_TIMESTAMP)
|
||||
ORDER BY
|
||||
created_at DESC
|
||||
",
|
||||
|
||||
Reference in New Issue
Block a user