Advertisement
Coriic

Untitled

Jan 19th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. put(CREATE_DIRECTORY, (request, response) -> {
  2.             return folderController.handleCreateNewFolder(setRequest(request, configuration), response);
  3.         }, json);
  4.  
  5.  
  6. private static Request setRequest(Request request, Configuration configuration){
  7.         Integer userId = new SessionDataDao(configuration).fetchBySessionId(request.queryParams("session")).get(0).getUserId();
  8.         String userName = new UsersDao(configuration).fetchOneById(userId).getUserName();
  9.         String oldPath = request.params(":path");
  10.         System.out.println("!!!!!!!");
  11.         request.attribute(":path", "%2F"+userName+oldPath);
  12.         return request;
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement