~cassaundra/nonbin

70428bfc3878992695583ba2ca4cab98ca002b2a — cassaundra 1 year, 6 months ago 810c80b
purge-expired: warn if expiration limit is unset in the config
1 files changed, 2 insertions(+), 1 deletions(-)

M src/controllers/paste.rs
M src/controllers/paste.rs => src/controllers/paste.rs +2 -1
@@ 1,7 1,7 @@
use axum::body::Bytes;
use chrono::{DateTime, Utc};
use futures_util::Stream;
use tracing::info;
use tracing::{info, warn};
use uuid::Uuid;

use crate::error::AppError;


@@ 46,6 46,7 @@ pub async fn delete(app: &mut App, key: &str) -> crate::AppResult<()> {

pub async fn purge_expired(app: &mut App) -> crate::AppResult<()> {
    let Some(expiration_secs) = app.config.limits.expiration_secs else {
        warn!("tried to purge expired, but no expiration limit was set");
        return Ok(());
    };