Skip to content

fix(backend): drop dead, mistyped itemRouter export#36

Closed
eouzoe wants to merge 1 commit into
mainfrom
pr/backend-drop-itemrouter
Closed

fix(backend): drop dead, mistyped itemRouter export#36
eouzoe wants to merge 1 commit into
mainfrom
pr/backend-drop-itemrouter

Conversation

@eouzoe

@eouzoe eouzoe commented Jul 16, 2026

Copy link
Copy Markdown
Owner

修改了什麼

apps/backend/src/contract.ts 移除未被使用的 itemRouter 匯出;apps/backend/src/handler.ts 同步移除對 itemRouter 的 import。

為什麼要修改

itemRouter 是一段死代碼:從未被任何路由或入口掛載,且 export 的 router 與實際 RPC handler(itemHandler)路徑不一致(mistyped)。留著只會造成混淆與維護負擔。

功能

  • 無新功能;純移除未使用匯出。

涉及檔案

  • apps/backend/src/contract.ts(-7 行,itemRouter 整段)
  • apps/backend/src/handler.ts(import 行移除 itemRouter

影響

  • 無行為變更。實際 RPC 入口為 handler.ts 中的 itemHandler,不受影響。
  • 全倉(排除 dist/ 構建產物)已確認無 itemRouter 引用。

參考文件 / 依據

  • apps/backend/src/index.ts 掛載的是 itemHandlerRPCHandler(itemHandler)),而非 itemRouter

測試

  • apps/backend 執行 tsc --noEmit -p . 通過(移除後類型檢查仍 OK)。
  • Grep 全倉 itemRouter 確認 src 零引用。

@eouzoe eouzoe closed this Jul 16, 2026
@eouzoe
eouzoe deleted the pr/backend-drop-itemrouter branch July 16, 2026 20:25
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.

1 participant