fix type error

This commit is contained in:
Pallavi Kumari
2025-10-20 22:31:26 +05:30
parent 49bc2dc5da
commit ad6bb3da9f

View File

@@ -57,6 +57,7 @@ type JoinedRow = {
proxyPort: number | null; proxyPort: number | null;
enabled: boolean; enabled: boolean;
domainId: string | null; domainId: string | null;
headerAuthId: number | null;
targetId: number | null; targetId: number | null;
targetIp: string | null; targetIp: string | null;
@@ -262,14 +263,19 @@ export async function listResources(
proxyPort: row.proxyPort, proxyPort: row.proxyPort,
enabled: row.enabled, enabled: row.enabled,
domainId: row.domainId, domainId: row.domainId,
niceId: row.niceId, headerAuthId: row.headerAuthId,
targets: [], targets: [],
}; };
map.set(row.resourceId, entry); map.set(row.resourceId, entry);
} }
// Push target if present (left join can be null) // Push target if present
if (row.targetId != null && row.targetIp && row.targetPort != null && row.targetEnabled != null) { if (
row.targetId != null &&
row.targetIp &&
row.targetPort != null &&
row.targetEnabled != null
) {
entry.targets.push({ entry.targets.push({
targetId: row.targetId, targetId: row.targetId,
ip: row.targetIp, ip: row.targetIp,