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:
@@ -603,8 +603,8 @@ export interface SNMPProfileCreate {
|
||||
export const snmpProfilesApi = {
|
||||
list: (tenantId: string) =>
|
||||
api
|
||||
.get<SNMPProfileResponse[]>(`/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
|
||||
|
||||
Reference in New Issue
Block a user