From c841a8f8737fa47e374f930bebb754093a700fad Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Fri, 22 Apr 2022 14:11:23 +0200 Subject: [PATCH] bugfixes --- pom.xml | 2 +- src/main/java/de/srsoftware/widerhall/web/Web.java | 5 ++--- static/templates/archive.st | 2 +- static/templates/js.st | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index dd221c3..ae00a28 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.example Widerhall - 0.2.17 + 0.2.18 diff --git a/src/main/java/de/srsoftware/widerhall/web/Web.java b/src/main/java/de/srsoftware/widerhall/web/Web.java index 937eab8..dee9a47 100644 --- a/src/main/java/de/srsoftware/widerhall/web/Web.java +++ b/src/main/java/de/srsoftware/widerhall/web/Web.java @@ -135,9 +135,8 @@ public class Web extends TemplateServlet { } private String archive(HttpServletRequest req, HttpServletResponse resp) { - var domain = req.getParameter(DOMAIN); - var prefix = req.getParameter(PREFIX); - return loadTemplate(ARCHIVE,Map.of(DOMAIN,domain,PREFIX,prefix),resp); + var list = Util.getMailingList(req); + return loadTemplate(ARCHIVE,Map.of(LIST,list.email()),resp); } private String confirm(HttpServletRequest req, HttpServletResponse resp) { diff --git a/static/templates/archive.st b/static/templates/archive.st index 4c462b1..f6424f8 100644 --- a/static/templates/archive.st +++ b/static/templates/archive.st @@ -21,6 +21,6 @@ «footer()» \ No newline at end of file diff --git a/static/templates/js.st b/static/templates/js.st index 0199ac1..9589d6a 100644 --- a/static/templates/js.st +++ b/static/templates/js.st @@ -40,8 +40,7 @@ function hideList(listEmail){ $.post('/api/list/hide',{list:listEmail},showListResult,'json'); } -function loadArchive(domain,prefix){ - let listEmail = prefix+'@'+domain; +function loadArchive(listEmail){ $.get('/api/list/archive?list='+listEmail,showListArchive,'json'); }