Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
api 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ori0o0p committed Feb 28, 2024
1 parent 74a0066 commit 164c7b7
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import com.example.daemawiki.domain.document.dto.response.GetDocumentResponse;
import com.example.daemawiki.domain.document.dto.response.SearchDocumentResponse;
import com.example.daemawiki.domain.document.dto.response.SimpleDocumentResponse;
import com.example.daemawiki.domain.editor.dto.AddEditorRequest;
import com.example.daemawiki.domain.editor.service.AddEditor;
import com.example.daemawiki.domain.info.dto.UpdateInfoRequest;
import com.example.daemawiki.domain.info.service.UpdateInfo;
import jakarta.validation.Valid;
Expand All @@ -31,15 +33,17 @@ public class DocumentController {
private final UpdateInfo updateInfoService;
private final WriteContent writeContentService;
private final AddContentTable addContentTableService;
private final AddEditor addEditorService;

public DocumentController(CreateDocument createDocument, GetDocument getDocument, DeleteDocument deleteDocument, UpdateDocument updateDocument, UpdateInfo updateInfoService, WriteContent writeContentService, AddContentTable addContentTableService) {
public DocumentController(CreateDocument createDocument, GetDocument getDocument, DeleteDocument deleteDocument, UpdateDocument updateDocument, UpdateInfo updateInfoService, WriteContent writeContentService, AddContentTable addContentTableService, AddEditor addEditorService) {
this.createDocumentService = createDocument;
this.getDocumentService = getDocument;
this.deleteDocumentService = deleteDocument;
this.updateDocumentService = updateDocument;
this.updateInfoService = updateInfoService;
this.writeContentService = writeContentService;
this.addContentTableService = addContentTableService;
this.addEditorService = addEditorService;
}

@PostMapping
Expand Down Expand Up @@ -98,4 +102,10 @@ public Mono<Void> addContentTable(@RequestBody AddContentRequest request) {
return addContentTableService.execute(request);
}

@PatchMapping("/editor")
@ResponseStatus(HttpStatus.NO_CONTENT)
public Mono<Void> addEditor(@RequestBody AddEditorRequest request) {
return addEditorService.execute(request);
}

}

0 comments on commit 164c7b7

Please sign in to comment.