|
|
@ -39,7 +39,6 @@ export const getHostConnection = buildGetRequestHandler( |
|
|
|
(request, buildQueryOptions) => { |
|
|
|
(request, buildQueryOptions) => { |
|
|
|
const { hostUUIDs: rawHostUUIDs } = request.query; |
|
|
|
const { hostUUIDs: rawHostUUIDs } = request.query; |
|
|
|
|
|
|
|
|
|
|
|
let localHostUUID: string; |
|
|
|
|
|
|
|
let rawDatabaseData: { |
|
|
|
let rawDatabaseData: { |
|
|
|
[hostUUID: string]: { |
|
|
|
[hostUUID: string]: { |
|
|
|
host: string; |
|
|
|
host: string; |
|
|
@ -51,13 +50,8 @@ export const getHostConnection = buildGetRequestHandler( |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
localHostUUID = getLocalHostUUID(); |
|
|
|
|
|
|
|
} catch (subError) { |
|
|
|
|
|
|
|
throw new Error(`Failed to get local host UUID; CAUSE: ${subError}`); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const hostUUIDField = 'ip_add.ip_address_host_uuid'; |
|
|
|
const hostUUIDField = 'ip_add.ip_address_host_uuid'; |
|
|
|
|
|
|
|
const localHostUUID: string = getLocalHostUUID(); |
|
|
|
const { after: condHostUUIDs, before: beforeBuildIDCond } = |
|
|
|
const { after: condHostUUIDs, before: beforeBuildIDCond } = |
|
|
|
buildUnknownIDCondition(rawHostUUIDs, hostUUIDField, { |
|
|
|
buildUnknownIDCondition(rawHostUUIDs, hostUUIDField, { |
|
|
|
onFallback: () => `${hostUUIDField} = '${localHostUUID}'`, |
|
|
|
onFallback: () => `${hostUUIDField} = '${localHostUUID}'`, |
|
|
|