From 38f33eb5508b8c8802b95b58ecf230d2ffeeae25 Mon Sep 17 00:00:00 2001 From: Jason Staack Date: Sun, 22 Mar 2026 00:56:25 -0500 Subject: [PATCH] fix(ui): unwrap SNMPProfileListResponse wrapper in API client The list endpoint returns {profiles: [...]} but the client expected a flat array. Now correctly unwraps r.data.profiles. Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/lib/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index e5b43c7..3cf3e5f 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -603,8 +603,8 @@ export interface SNMPProfileCreate { export const snmpProfilesApi = { list: (tenantId: string) => api - .get(`/api/tenants/${tenantId}/snmp-profiles`) - .then((r) => r.data), + .get<{ profiles: SNMPProfileResponse[] }>(`/api/tenants/${tenantId}/snmp-profiles`) + .then((r) => r.data.profiles), get: (tenantId: string, profileId: string) => api