Skip to content

Commit

Permalink
Revert "Decode path for createElementInDirectoryPath endpoint (#156)" (
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinebhs authored Aug 1, 2024
1 parent 4d88e0d commit f301a99
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.UUID;

Expand Down Expand Up @@ -83,8 +81,7 @@ public ResponseEntity<ElementAttributes> duplicateElement(
})
public ResponseEntity<Void> createElementInDirectoryPath(@RequestParam("directoryPath") String directoryPath, @RequestBody ElementAttributes elementAttributes,
@RequestHeader("userId") String userId) {
String decodedDirectoryPath = URLDecoder.decode(directoryPath, StandardCharsets.UTF_8);
service.createElementInDirectoryPath(decodedDirectoryPath, elementAttributes, userId);
service.createElementInDirectoryPath(directoryPath, elementAttributes, userId);
return ResponseEntity.status(HttpStatus.OK).contentType(MediaType.APPLICATION_JSON).build();
}

Expand Down

This file was deleted.

0 comments on commit f301a99

Please sign in to comment.