Skip to content

[REFACTOR] 미사용 API 제거 및 모듈 정리#51

Merged
Takch02 merged 2 commits into
mainfrom
refactor/cleanup-unused-modules
May 16, 2026
Merged

[REFACTOR] 미사용 API 제거 및 모듈 정리#51
Takch02 merged 2 commits into
mainfrom
refactor/cleanup-unused-modules

Conversation

@Takch02

@Takch02 Takch02 commented May 15, 2026

Copy link
Copy Markdown
Contributor

Resolves #50

개요

현재 서비스에서 호출되지 않는 API 모듈 3개를 제거합니다.
스키마는 my-business, partners 등 다른 모듈에서 직접 참조 중이므로 유지합니다.

변경 사항

제거

  • consultations 모듈 전체 (controller / service / dto / schema)
  • buyers 모듈 — schema 제외 전체 (controller / service / module / dto / spec)
  • sellers 모듈 — schema 제외 전체 (controller / service / module / dto / spec)

수정

  • app.module.ts — BuyersModule, SellersModule, ConsultationsModule 등록 제거
  • my-business.module.ts, partners.module.ts — BuyersModule/SellersModule 의존 제거,
    MongooseModule.forFeature로 스키마 직접 주입

Summary by CodeRabbit

릴리스 노트

  • Refactor

    • 모듈 구조를 재편성하여 일부 기능의 의존성을 직접 등록 방식으로 변경
  • Chores

    • 구매자, 판매자, 상담 관련 모듈 및 엔드포인트 제거
    • 구매자 목록 조회, 상세 조회 엔드포인트 중단
    • 판매자 목록 조회 엔드포인트 중단
    • 상담 예약, 상담 목록 조회, 상태 변경 엔드포인트 중단

Review Change Stack

Takch02 and others added 2 commits May 15, 2026 15:06
- buyers/sellers controller, service, module, dto, spec 파일 제거
- app.module.ts에서 BuyersModule, SellersModule 등록 제거
- my-business, partners 모듈에서 MongooseModule.forFeature로 직접 스키마 주입으로 전환

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
현재 미사용 API로 controller, service, dto, schema 전체 제거

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 961d16d6-a99c-4286-9ba1-79d0e70ab684

📥 Commits

Reviewing files that changed from the base of the PR and between 7eba00a and b449a7d.

📒 Files selected for processing (24)
  • src/app.module.ts
  • src/modules/buyers/buyers.controller.spec.ts
  • src/modules/buyers/buyers.controller.ts
  • src/modules/buyers/buyers.module.ts
  • src/modules/buyers/buyers.service.spec.ts
  • src/modules/buyers/buyers.service.ts
  • src/modules/buyers/dto/query-buyer.dto.ts
  • src/modules/consultations/consultations.controller.ts
  • src/modules/consultations/consultations.module.ts
  • src/modules/consultations/consultations.service.ts
  • src/modules/consultations/dto/create-consultation.dto.ts
  • src/modules/consultations/dto/query-consultation.dto.ts
  • src/modules/consultations/dto/update-consultation-status.dto.ts
  • src/modules/consultations/schemas/consultation.schema.ts
  • src/modules/my-business/my-business.module.ts
  • src/modules/partners/partners.module.ts
  • src/modules/sellers/dto/create-seller.dto.ts
  • src/modules/sellers/dto/query-seller.dto.ts
  • src/modules/sellers/dto/update-seller.dto.ts
  • src/modules/sellers/sellers.controller.spec.ts
  • src/modules/sellers/sellers.controller.ts
  • src/modules/sellers/sellers.module.ts
  • src/modules/sellers/sellers.service.spec.ts
  • src/modules/sellers/sellers.service.ts
💤 Files with no reviewable changes (22)
  • src/modules/sellers/sellers.module.ts
  • src/modules/buyers/buyers.module.ts
  • src/modules/buyers/dto/query-buyer.dto.ts
  • src/modules/consultations/dto/update-consultation-status.dto.ts
  • src/modules/sellers/sellers.controller.ts
  • src/modules/consultations/dto/create-consultation.dto.ts
  • src/modules/consultations/consultations.module.ts
  • src/modules/buyers/buyers.controller.ts
  • src/modules/sellers/dto/create-seller.dto.ts
  • src/modules/consultations/dto/query-consultation.dto.ts
  • src/modules/sellers/sellers.service.ts
  • src/app.module.ts
  • src/modules/buyers/buyers.service.ts
  • src/modules/buyers/buyers.service.spec.ts
  • src/modules/sellers/sellers.service.spec.ts
  • src/modules/consultations/consultations.controller.ts
  • src/modules/sellers/dto/query-seller.dto.ts
  • src/modules/sellers/dto/update-seller.dto.ts
  • src/modules/consultations/consultations.service.ts
  • src/modules/sellers/sellers.controller.spec.ts
  • src/modules/buyers/buyers.controller.spec.ts
  • src/modules/consultations/schemas/consultation.schema.ts

📝 Walkthrough

Walkthrough

이 PR은 Swagger 문서에 노출되었으나 실제로는 사용되지 않는 API를 제거하는 리팩토링입니다. Sellers, Buyers, Consultations 모듈의 컨트롤러, 서비스, DTO를 삭제하고, 이들에 의존하던 MyBusinessModule과 PartnersModule은 제거된 모듈 대신 스키마를 직접 등록하도록 변경합니다.

Changes

미사용 API 모듈 제거

Layer / File(s) Summary
AppModule 루트 정리 및 모듈 임포트 제거
src/app.module.ts
AppModule에서 SellersModule, BuyersModule, ConsultationsModule 임포트 문과 imports 배열 항목을 제거하여 불필요한 모듈 등록을 정리합니다. PartnersModule은 유지됩니다.
의존 모듈의 스키마 직접 등록으로 변경
src/modules/my-business/my-business.module.ts, src/modules/partners/partners.module.ts
제거된 SellersModuleBuyersModule에 대한 의존성을 제거하고, MongooseModule.forFeature()를 사용해 SellerSchemaBuyerSchema를 직접 등록하도록 모듈 wiring을 변경합니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes


Possibly related PRs

  • K-Statra/backend#6: 동일한 도메인 리팩토링—auth 기반 통합 회원가입/로그인 도입으로 직접 buyer/seller CRUD를 대체
  • K-Statra/backend#19: MyBusinessModule 도입으로 SellersModule/BuyersModule 임포트를 설정했으나, 본 PR에서 그 모듈들을 제거하고 스키마 직접 등록으로 전환

Poem

🗑️ 불필요한 길을 걷지 말고,
스키마는 그대로, API는 거두고,
Swagger 문서 깔끔하게—
미래 기획을 위해 자리를 비우네.
프론트 개발자의 혼동도 사라져라! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용을 명확하게 반영하고 있습니다. '[REFACTOR] 미사용 API 제거 및 모듈 정리'는 제거된 여러 API 모듈과 수정된 모듈 구조를 잘 요약합니다.
Linked Issues check ✅ Passed PR이 연결된 이슈 #50의 모든 요구사항을 충족합니다: Seller Module(스키마 제외) 제거, Buyer Module(스키마 제외) 제거, Consultations Module 전체 제거가 모두 구현되었으며, 다른 모듈에서 참조되는 스키마는 유지되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #50의 범위 내에 있습니다. 불필요한 스키마 파일 제거나 추가 로직 수정이 없으며, 제거 대상 모듈과 의존성 주입 방식 변경만 포함되어 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/cleanup-unused-modules

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Takch02

Takch02 commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Takch02 Takch02 merged commit 63d00b3 into main May 16, 2026
3 checks passed
@Takch02 Takch02 deleted the refactor/cleanup-unused-modules branch May 16, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 미사용 API 제거

1 participant