Skip to content

Commit 1105cc3

Browse files
authored
Merge pull request #138 from Crew-Wiki/feat/137
feat: 특정 문서에 대한 조직 문서 삭제 API 구현
2 parents fabdf02 + f1910ca commit 1105cc3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/main/java/com/wooteco/wiki/document/controller/DocumentController.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.UUID;
2020
import lombok.RequiredArgsConstructor;
2121
import org.springframework.data.domain.Page;
22+
import org.springframework.http.HttpStatus;
2223
import 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(),

0 commit comments

Comments
 (0)