[feat] 사용 변경 신청 및 관리자 승인/거절, 그룹 생성#125
Merged
saokiritoni merged 23 commits intodevelopfrom Sep 8, 2025
Merged
Conversation
Contributor
|
This pull request refactors and expands the admin request management APIs, splitting change request handling into a dedicated controller and interface, improving API documentation, and standardizing success responses. It also enhances DTOs with Swagger annotations for better API documentation and clarifies enum values for change types. API Structure and Documentation Improvements
Controller and Endpoint Changes
Domain and DTO Enhancements
|
kwdahun
approved these changes
Sep 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌱 관련 이슈
🌱 작업 사항
서버 신청(
Request) 변경 요청 (ChangeRequest) 관련 작업컨트롤러 역할 분리 (
AdminRequestController,AdminRequestChangeController)AdminRequestController: 신규 서버 사용 신청 조회, 승인, 거질 등Request'기능만 담당하도록 분리했습니다.AdminRequestChangeController: 사용자가 제출한 변경 요청 조회, 승인, 거절 등ChangeRequest기능만 담당하도록 분리했습니다.API URI 및 용어 통일
approve와approveModification처럼 기능에 따라 메서드 명, URI 경로가 달랐고, 거절 기능의 경우reject와deny가 혼용되어 있었습니다./api/admin/request는 신규 요청 관련 기능을,/api/admin/requests/change는 변경 관련 기능을 다루도록 보다 명확하게 경로를 분리했습니다.reject로 통일했습니다. 비즈니스 메서드명도reject + N형태로 통일했습니다.ubuntu 그룹 생성 API 연결
짜잘한 수정
엔티티 메서드 수정
update()로 전체 필드를 통으로 처리하는 것에서, 각 필드를 update하는 것으로 수정했습니다.update()는volumeSizeGiB와expiresAt만 처리하도록 고정되어 있었습니다. 만약에 새로운 변경 요구사항이 들어오면 이 메서드를 계속해서 수정해야 하는 문제가 발생합니다.updateVolumeSize()등 setter 역할 메서드를 두면, 서비스 레이어의 switch-case문만 수정해주면 되기 때문에 변경 사항의 폭이 줄어들 것이라고 생각했습니다.Request,RequestGroup,Group,ChangeRequest,Group...이 엔티티 전체에 영향을 주는 메서드가 될 거라서, 한 엔티티 안에 넣기는 SRP에 맞지 않다고 생각했습니다. 특히 Request에 넣으면, 이 엔티티가GroupRepository에 의존해야 하는데 도메인 엔티티가 인프라 레이어에 의존하게 되어 순수성을 잃어버릴 수밖에 없습니다.🌱 참고 사항