mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-21 12:26:40 +00:00
fix type error
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user