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) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-22 00:56:25 -05:00
parent f7aa685a5d
commit 38f33eb550

View File

@@ -603,8 +603,8 @@ export interface SNMPProfileCreate {
export const snmpProfilesApi = { export const snmpProfilesApi = {
list: (tenantId: string) => list: (tenantId: string) =>
api api
.get<SNMPProfileResponse[]>(`/api/tenants/${tenantId}/snmp-profiles`) .get<{ profiles: SNMPProfileResponse[] }>(`/api/tenants/${tenantId}/snmp-profiles`)
.then((r) => r.data), .then((r) => r.data.profiles),
get: (tenantId: string, profileId: string) => get: (tenantId: string, profileId: string) =>
api api