mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
18.28.2019 53fb8c894e12607f6c2552af182ee23f1db8e9a2
borgbutler-server/src/main/java/de/micromata/borgbutler/server/rest/ConfigurationRest.java
@@ -19,14 +19,14 @@
public class ConfigurationRest {
    private Logger log = LoggerFactory.getLogger(ConfigurationRest.class);
    @GET
    @Path("config")
    @Produces(MediaType.APPLICATION_JSON)
    /**
     *
     * @param prettyPrinter If true then the json output will be in pretty format.
     * @see JsonUtils#toJson(Object, boolean)
     */
    @GET
    @Path("config")
    @Produces(MediaType.APPLICATION_JSON)
    public String getConfig(@QueryParam("prettyPrinter") boolean prettyPrinter) {
        String json = JsonUtils.toJson(ServerConfiguration.get(), prettyPrinter);
        return json;
@@ -45,14 +45,14 @@
        configurationHandler.save();
    }
    @GET
    @Path("user")
    @Produces(MediaType.APPLICATION_JSON)
    /**
     *
     * @param prettyPrinter If true then the json output will be in pretty format.
     * @see JsonUtils#toJson(Object, boolean)
     */
    @GET
    @Path("user")
    @Produces(MediaType.APPLICATION_JSON)
    public String getUser(@QueryParam("prettyPrinter") boolean prettyPrinter) {
        UserData user = RestUtils.getUser();
        String json = JsonUtils.toJson(user, prettyPrinter);