fix: Items API 유연성 개선 - Flow Tester 호환성
- GET /api/v1/items/bom 엔드포인트 추가 (BOM 있는 전체 품목 목록) - ItemService::index() item_type/group_id 없으면 group_id=1 기본값 적용 - ItemService::showByCode() item_type 없으면 items 테이블에서 직접 검색 - ItemsBomController::listAll() 메서드 추가 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -778,6 +778,10 @@
|
||||
Route::delete('/{id}', [ItemsController::class, 'destroy'])->name('v1.items.destroy'); // 품목 삭제
|
||||
});
|
||||
|
||||
// Items BOM - 전체 BOM 목록 (item_id 없이)
|
||||
// 주의: /items/{id}/bom 보다 먼저 정의해야 함 ('bom'이 {id}로 인식되지 않도록)
|
||||
Route::get('items/bom', [ItemsBomController::class, 'listAll'])->name('v1.items.bom.list-all');
|
||||
|
||||
// Items BOM (ID-based BOM API)
|
||||
Route::prefix('items/{id}/bom')->group(function () {
|
||||
Route::get('', [ItemsBomController::class, 'index'])->name('v1.items.bom.index'); // BOM 목록 (flat)
|
||||
|
||||
Reference in New Issue
Block a user