fix(WEB): API 로그 목록 정렬 순서 수정
- ApiLogController에서 항상 최신순으로 정렬하도록 변경 - 조건부 정렬 제거하고 고정 내림차순 정렬 적용 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,17 +16,9 @@ class ApiLogController extends Controller
|
||||
*/
|
||||
public function index(Request $request): View
|
||||
{
|
||||
// 필터가 적용되면 오래된 순, 아니면 최신순
|
||||
$hasFilter = $request->hasAny(['method', 'status', 'search', 'group_id', 'tenant_id']);
|
||||
|
||||
$query = ApiRequestLog::query()
|
||||
->with(['tenant', 'user']);
|
||||
|
||||
if ($hasFilter) {
|
||||
$query->orderBy('created_at'); // 오래된 순
|
||||
} else {
|
||||
$query->orderByDesc('created_at'); // 최신순
|
||||
}
|
||||
->with(['tenant', 'user'])
|
||||
->orderByDesc('created_at'); // 항상 최신순
|
||||
|
||||
// 필터: HTTP 메서드 (다중 선택 가능)
|
||||
if ($request->filled('method')) {
|
||||
|
||||
Reference in New Issue
Block a user