From 39d410b050c54c900ddb8ac1e50a5fb6c79d418a Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 8 Apr 2024 20:25:13 +0200 Subject: [PATCH] only show notifications from last 2 weeks --- src/model/notification.rs | 2 +- templates/index.html.tera | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/notification.rs b/src/model/notification.rs index 2a661cf..2ec3923 100644 --- a/src/model/notification.rs +++ b/src/model/notification.rs @@ -64,7 +64,7 @@ WHERE user_id = ? AND ( read_at IS NULL - OR read_at >= datetime('now', '-30 days') + OR read_at >= datetime('now', '-14 days') ) ORDER BY read_at DESC, created_at DESC; ", diff --git a/templates/index.html.tera b/templates/index.html.tera index 06d985e..8bcb4f9 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -39,7 +39,7 @@ {% endfor %}
- Vergangene Nachrichten + Vergangene Nachrichten (14 Tage)
{% for notification in notifications %} {% if notification.read_at %} -- 2.45.2