File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/main/java/com/wooteco/wiki/document/controller Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1919import java .util .UUID ;
2020import lombok .RequiredArgsConstructor ;
2121import org .springframework .data .domain .Page ;
22+ import org .springframework .http .HttpStatus ;
2223import org .springframework .web .bind .annotation .*;
2324
2425@ RestController
@@ -125,6 +126,18 @@ public ApiResponse<SuccessBody<List<OrganizationDocumentSearchResponse>>> readOr
125126 return ApiResponseGenerator .success (documentServiceJava .searchOrganizationDocument (uuid ));
126127 }
127128
129+ @ Operation (summary = "특정 문서에 대한 조직 문서 삭제 API" , description = "특정 문서에 대한 조직 문서를 제거합니다." )
130+ @ DeleteMapping ("/{uuidText}/organization-documents/{organizationDocumentUuidText}" )
131+ public ApiResponse <SuccessBody <Void >> deleteOrganizationDocument (
132+ @ PathVariable String uuidText ,
133+ @ PathVariable String organizationDocumentUuidText
134+ ) {
135+ UUID documentUuid = UUID .fromString (uuidText );
136+ UUID organizationDocumentUuid = UUID .fromString (organizationDocumentUuidText );
137+ documentServiceJava .deleteOrganizationDocument (documentUuid , organizationDocumentUuid );
138+ return ApiResponseGenerator .success (HttpStatus .NO_CONTENT );
139+ }
140+
128141 private <T > ResponseDto <List <T >> convertToResponse (Page <T > pageResponses ) {
129142 return ResponseDto .of (
130143 pageResponses .getNumber (),
You can’t perform that action at this time.
0 commit comments