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

...
Kai Reinhard
14.56.2018 19732b785f222871a76f931213587b2c04cc1e10
borgbutler-server/src/main/java/de/micromata/borgbutler/server/rest/ReposRest.java
@@ -24,16 +24,32 @@
    @Produces(MediaType.APPLICATION_JSON)
    /**
     *
     * @param id
     * @param id id or name of repo.
     * @param prettyPrinter If true then the json output will be in pretty format.
     * @return Repository (without list of archives) as json string.
     * @see JsonUtils#toJson(Object, boolean)
     */
    public String getTemplate(@QueryParam("id") String id, @QueryParam("prettyPrinter") boolean prettyPrinter) {
    public String getRepo(@QueryParam("id") String id, @QueryParam("prettyPrinter") boolean prettyPrinter) {
        Repository repository = ButlerCache.getInstance().getRepository(id);
        return JsonUtils.toJson(repository, prettyPrinter);
    }
    @GET
    @Path("repoArchiveList")
    @Produces(MediaType.APPLICATION_JSON)
    /**
     *
     * @param id id or name of repo.
     * @param prettyPrinter If true then the json output will be in pretty format.
     * @return Repository (including list of archives) as json string.
     * @see JsonUtils#toJson(Object, boolean)
     */
    public String getRepoArchiveList(@QueryParam("id") String id, @QueryParam("prettyPrinter") boolean prettyPrinter) {
        Repository repository = ButlerCache.getInstance().getRepositoryArchives(id);
        return JsonUtils.toJson(repository, prettyPrinter);
    }
    @GET
    @Path("list")
    @Produces(MediaType.APPLICATION_JSON)
    /**