fix ignore content type being missing on /api/upload
This commit is contained in:
parent
9c74f41022
commit
a7e6488e72
@ -21,7 +21,7 @@ public class PasteController {
|
||||
}
|
||||
|
||||
@PostMapping(value = "/upload")
|
||||
public ResponseEntity<?> uploadPaste(@RequestBody String content, @RequestHeader(HttpHeaders.CONTENT_TYPE) String contentType) {
|
||||
public ResponseEntity<?> uploadPaste(@RequestBody String content, @RequestHeader(value = HttpHeaders.CONTENT_TYPE, required = false) String contentType) {
|
||||
String id = pasteService.createPaste(content, contentType);
|
||||
return ResponseEntity.ok(Map.of("key", id));
|
||||
}
|
||||
|
Reference in New Issue
Block a user