minor code improvements
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>org.example</groupId>
|
<groupId>org.example</groupId>
|
||||||
<artifactId>Widerhall</artifactId>
|
<artifactId>Widerhall</artifactId>
|
||||||
<version>0.0.11</version>
|
<version>0.0.12</version>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|||||||
@@ -213,10 +213,10 @@ public class Rest extends HttpServlet {
|
|||||||
return Map.of(SUCCESS,t("Mailing list '{}' was {}!",listEmail,enable ? "enabled" : "disabled"));
|
return Map.of(SUCCESS,t("Mailing list '{}' was {}!",listEmail,enable ? "enabled" : "disabled"));
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
LOG.error("Failed to enable/disable mailing list: ",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) {
|
private Map<String, String> hideList(String listEmail, User user, boolean hide) {
|
||||||
@@ -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) {
|
private Map testList(String listEmail, User user) {
|
||||||
|
|||||||
Reference in New Issue
Block a user