Skip to content

Commit

Permalink
style(cmdb-detail): 修复实例详情代理接口响应体问题
Browse files Browse the repository at this point in the history
Refs CMDB_CONSUME-436
  • Loading branch information
panzekun committed Nov 6, 2024
1 parent 69a80ac commit d94e188
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions libs/cmdb-instances/src/data-providers/fetchCmdbInstanceDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ export function fetchCmdbInstanceDetail(
sourceId?: string
): Promise<Partial<InstanceApi_GetDetailResponseBody>> {
return sourceId
? http.post(
"api/gateway/[email protected]/api/v1/proxy-get-instance-detail",
{
objectId,
sourceId,
}
)
? http
.post(
"api/gateway/easyops.api.%[email protected]/api/v1/proxy-get-instance-detail",
{
objectId,
sourceId,
instanceId,
}
)
.then((res: InstanceApi_GetDetailResponseBody) => res.data)
: InstanceApi_getDetail(objectId, instanceId, {});
}

Expand All @@ -29,15 +32,18 @@ export function fetchCmdbInstanceDetailByFields(
sourceId?: string
): Promise<Partial<InstanceApi_GetDetailResponseBody>> {
return sourceId
? http.post(
"api/gateway/[email protected]/api/v1/proxy-get-instance-detail",
{
objectId,
sourceId,
fields,
relation_limit,
}
)
? http
.post(
"api/gateway/easyops.api.%[email protected]/api/v1/proxy-get-instance-detail",
{
objectId,
sourceId,
instanceId,
fields,
relation_limit,
}
)
.then((res: InstanceApi_GetDetailResponseBody) => res.data)
: InstanceApi_getDetail(objectId, instanceId, {
fields,
relation_limit,
Expand Down

0 comments on commit d94e188

Please sign in to comment.