From 4fcd4e9e197a00ec93b5d06e1674d6ab8b83cfb9 Mon Sep 17 00:00:00 2001 From: albocc Date: Wed, 9 Nov 2022 11:57:49 +0100 Subject: [PATCH] Added expiration option for 3 days --- src/endpoints/create.rs | 1 + templates/index.html | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/endpoints/create.rs b/src/endpoints/create.rs index 715007e..7aefeab 100644 --- a/src/endpoints/create.rs +++ b/src/endpoints/create.rs @@ -81,6 +81,7 @@ pub async fn create( "10min" => timenow + 60 * 10, "1hour" => timenow + 60 * 60, "24hour" => timenow + 60 * 60 * 24, + "3days" => timenow + 60 * 60 * 24 * 3, "1week" => timenow + 60 * 60 * 24 * 7, "never" => { if ARGS.no_eternal_pasta { diff --git a/templates/index.html b/templates/index.html index 2f74907..791f827 100644 --- a/templates/index.html +++ b/templates/index.html @@ -35,6 +35,13 @@ {%- endif %} 24 hours + {% if args.default_expiry == "3days" %} + {% if args.default_expiry == "1week" %}