fix(SAM/API): 메뉴 목록 조회 시 is_active 기본값 true 설정
- GET /api/v1/menus에서 is_active 파라미터 없으면 기본값 1(활성)로 설정 - 비활성 메뉴 조회는 is_active=0 명시적으로 전달 필요 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -47,9 +47,8 @@ public static function index(array $params)
|
||||
if (array_key_exists('parent_id', $params)) {
|
||||
$q->where('parent_id', $params['parent_id']);
|
||||
}
|
||||
if (array_key_exists('is_active', $params)) {
|
||||
$q->where('is_active', (int) $params['is_active']);
|
||||
}
|
||||
// is_active 기본값 true (파라미터 없으면 활성화된 메뉴만)
|
||||
$q->where('is_active', (int) ($params['is_active'] ?? 1));
|
||||
if (array_key_exists('hidden', $params)) {
|
||||
$q->where('hidden', (int) $params['hidden']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user