Compare commits

...

1 Commits

Author SHA1 Message Date
409
676f0ca01c fix share list including expired shares 2025-09-07 18:04:36 +02:00
2 changed files with 3 additions and 1 deletions

View File

@@ -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?;

View File

@@ -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
",