Browse Source

minor code improvements

drop_old_mail
Stephan Richter 3 years ago
parent
commit
1b9a69e60d
  1. 2
      pom.xml
  2. 6
      src/main/java/de/srsoftware/widerhall/web/Rest.java

2
pom.xml

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

6
src/main/java/de/srsoftware/widerhall/web/Rest.java

@ -213,10 +213,10 @@ public class Rest extends HttpServlet { @@ -213,10 +213,10 @@ public class Rest extends HttpServlet {
return Map.of(SUCCESS,t("Mailing list '{}' was {}!",listEmail,enable ? "enabled" : "disabled"));
} catch (SQLException e) {
LOG.error("Failed to enable/disable mailing list: ",e);
return Map.of("error",t("Failed to update list '{}'",listEmail));
return Map.of(ERROR,t("Failed to update list '{}'",listEmail));
}
}
return Map.of("error",t("You are not allowed to edit '{}'",listEmail));
return Map.of(ERROR,t("You are not allowed to edit '{}'",listEmail));
}
private Map<String, String> hideList(String listEmail, User user, boolean hide) {
@ -231,7 +231,7 @@ public class Rest extends HttpServlet { @@ -231,7 +231,7 @@ public class Rest extends HttpServlet {
}
}
return Map.of("error",t("You are not allowed to edit '{}'",listEmail));
return Map.of(ERROR,t("You are not allowed to edit '{}'",listEmail));
}
private Map testList(String listEmail, User user) {

Loading…
Cancel
Save