Skip to content

Commit

Permalink
Merge pull request #216 from openkm/issue/213
Browse files Browse the repository at this point in the history
Add createMissingFolders
  • Loading branch information
darkman97i authored Feb 8, 2020
2 parents 1558706 + b11faa2 commit 15b5afd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/java/com/openkm/rest/endpoint/FolderService.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.openkm.api.OKMFolder;
import com.openkm.bean.Folder;
import com.openkm.core.MimeTypeConfig;
import com.openkm.module.FolderModule;
Expand Down Expand Up @@ -172,4 +173,17 @@ public String getPath(@PathParam("uuid") String uuid) throws GenericException {
throw new GenericException(e);
}
}

@PUT
@Path("/createMissingFolders")
public void createMissingFolders(@QueryParam("fldPath") String fldPath) throws GenericException {
try {
log.debug("createMissingFolders({})", fldPath);
OKMFolder.getInstance().createMissingFolders(null, fldPath);
log.debug("createMissingFolders: void");
} catch (Exception e) {
throw new GenericException(e);
}
}
}

0 comments on commit 15b5afd

Please sign in to comment.