diff --git a/src/main/java/com/example/daemawiki/domain/document/api/DocumentController.java b/src/main/java/com/example/daemawiki/domain/document/api/DocumentController.java index b046f690..41c81c0e 100644 --- a/src/main/java/com/example/daemawiki/domain/document/api/DocumentController.java +++ b/src/main/java/com/example/daemawiki/domain/document/api/DocumentController.java @@ -28,7 +28,7 @@ public DocumentController(CreateDocument createDocument, GetDocument getDocument @PostMapping @ResponseStatus(HttpStatus.CREATED) - public Mono createDocument(@Valid @RequestBody CreateDocumentRequest request) { + public Mono createDocument(@Valid @RequestBody SaveDocumentRequest request) { return createDocumentService.execute(request); } @@ -43,10 +43,10 @@ public Mono deleteDocument(@PathVariable String documentId) { return deleteDocumentService.execute(documentId); } - @PatchMapping + @PatchMapping("/{documentId}") @ResponseStatus(HttpStatus.NO_CONTENT) - public Mono updateDocument(@RequestBody SaveDocumentRequest request) { - return updateDocumentService.execute(request); + public Mono updateDocument(@PathVariable String documentId, @RequestBody SaveDocumentRequest request) { + return updateDocumentService.execute(request, documentId); } }