Browse Source

bugfixes

drop_old_mail
Stephan Richter 3 years ago
parent
commit
c841a8f873
  1. 2
      pom.xml
  2. 5
      src/main/java/de/srsoftware/widerhall/web/Web.java
  3. 2
      static/templates/archive.st
  4. 3
      static/templates/js.st

2
pom.xml

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
<groupId>org.example</groupId>
<artifactId>Widerhall</artifactId>
<version>0.2.17</version>
<version>0.2.18</version>
<build>
<plugins>
<plugin>

5
src/main/java/de/srsoftware/widerhall/web/Web.java

@ -135,9 +135,8 @@ public class Web extends TemplateServlet { @@ -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) {

2
static/templates/archive.st

@ -21,6 +21,6 @@ @@ -21,6 +21,6 @@
«footer()»
</body>
<script type="text/javascript">
loadArchive('«data.domain»','«data.prefix»');
loadArchive('«data.list»');
</script>
</html>

3
static/templates/js.st

@ -40,8 +40,7 @@ function hideList(listEmail){ @@ -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');
}

Loading…
Cancel
Save