diff --git a/src/main/java/capstone/relation/document/controller/DocsController.java b/src/main/java/capstone/relation/document/controller/DocsController.java index 6095caa..7aa3db0 100644 --- a/src/main/java/capstone/relation/document/controller/DocsController.java +++ b/src/main/java/capstone/relation/document/controller/DocsController.java @@ -14,6 +14,7 @@ import capstone.relation.document.dto.CreateFileReqDto; import capstone.relation.document.dto.FileContentDto; +import capstone.relation.document.dto.FileNameChangeDto; import capstone.relation.document.dto.FolderCreateDto; import capstone.relation.document.dto.FolderInfoDto; import capstone.relation.document.dto.UpdateFileReqDto; @@ -70,8 +71,8 @@ public FileContentDto createFile(@RequestBody CreateFileReqDto createFileReqDto) @PatchMapping("/file/name/{id}") @Operation(summary = "파일 명 수정", description = "파일명을 수정합니다.") - public FileContentDto updateFileName(@PathVariable Long id, @RequestBody String fileName) { - return docsService.updateFileName(SecurityUtil.getCurrentUserId(), id, fileName); + public FileContentDto updateFileName(@PathVariable Long id, @RequestBody FileNameChangeDto fileNameChangeDto) { + return docsService.updateFileName(SecurityUtil.getCurrentUserId(), id, fileNameChangeDto.getFileName()); } @PatchMapping("/file/{id}") diff --git a/src/main/java/capstone/relation/document/dto/FileNameChangeDto.java b/src/main/java/capstone/relation/document/dto/FileNameChangeDto.java new file mode 100644 index 0000000..2a9bed5 --- /dev/null +++ b/src/main/java/capstone/relation/document/dto/FileNameChangeDto.java @@ -0,0 +1,12 @@ +package capstone.relation.document.dto; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class FileNameChangeDto { + private String fileName; +}