Inline auth for custom nodes
This commit is contained in:
parent
b39b36d0dc
commit
6157208557
|
@ -348,16 +348,18 @@ class CustomNodeModal extends React.Component<Props, State> {
|
||||||
name: this.state.name.trim(),
|
name: this.state.name.trim(),
|
||||||
url,
|
url,
|
||||||
port,
|
port,
|
||||||
network: networkId
|
network: networkId,
|
||||||
|
...(this.state.hasAuth
|
||||||
|
? {
|
||||||
|
auth: {
|
||||||
|
username: this.state.username,
|
||||||
|
password: this.state.password
|
||||||
|
}
|
||||||
|
}
|
||||||
|
: {})
|
||||||
};
|
};
|
||||||
|
|
||||||
const lib = new CustomNode(node);
|
const lib = new CustomNode(node);
|
||||||
if (this.state.hasAuth) {
|
|
||||||
node.auth = {
|
|
||||||
username: this.state.username,
|
|
||||||
password: this.state.password
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return { ...node, lib };
|
return { ...node, lib };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue