From 410648a03b4812be50035389ceafabe86b74a76c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=8A=B9=EC=9B=90?= <107746917+ori0o0p@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:44:55 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8F=B0=EC=BD=94=EB=94=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/document/component/service/CreateDocument.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/example/daemawiki/domain/document/component/service/CreateDocument.java b/src/main/java/com/example/daemawiki/domain/document/component/service/CreateDocument.java index ea371240..c13f6c68 100644 --- a/src/main/java/com/example/daemawiki/domain/document/component/service/CreateDocument.java +++ b/src/main/java/com/example/daemawiki/domain/document/component/service/CreateDocument.java @@ -28,7 +28,8 @@ public CreateDocument(DocumentFacade documentFacade, UserFacade userFacade, Revi public Mono execute(SaveDocumentRequest request) { return userFacade.currentUser() .map(user -> createDocumentFacade.execute(request, user)) - .flatMap(document -> Mono.when(documentFacade.saveDocument(document), revisionComponent.saveHistory(SaveRevisionHistoryRequest.builder() + .flatMap(document -> documentFacade.saveDocument(document) + .then(revisionComponent.saveHistory(SaveRevisionHistoryRequest.builder() .type(RevisionType.CREATE) .documentId(document.getId()) .title(document.getTitle())