From 8e1cd6afaaa48050795ae9036a252a43d9f60830 Mon Sep 17 00:00:00 2001
From: Massimiliano Adamo <maxadamo@gmail.com>
Date: Mon, 17 Feb 2025 13:25:56 +0100
Subject: [PATCH] fix: update condition to check for "_expired.json" suffix in
 renderPage function

---
 main.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main.go b/main.go
index 8f4c844..d85bfd6 100644
--- a/main.go
+++ b/main.go
@@ -65,7 +65,7 @@ func renderPage(w http.ResponseWriter, req *http.Request) {
 	outputDir := filepath.Join(webDir, provider)
 	serveFile := filepath.Join(webDir, req.URL.Path)
 	suffix := ""
-	if strings.HasSuffix(serveFile, "/by_date.html") {
+	if strings.HasSuffix(serveFile, "_expired.json") {
 		suffix = "_expired"
 	}
 
-- 
GitLab