fix bug in net create

This commit is contained in:
Arthur Lu 2023-11-09 20:46:50 +00:00
parent 5989d86ef8
commit 6e2b284118

View File

@ -63,7 +63,7 @@ router.post("/:netid/create", async (req, res) => {
return;
}
// setup action
const nc = db.getUser(req.cookies.username).network[params.type];
const nc = db.getUser(req.cookies.username).templates.network[params.type];
let action = {};
if (params.type === "lxc") {
action[`net${params.netid}`] = `name=${params.name},bridge=${nc.bridge},ip=${nc.ip},ip6=${nc.ip6},tag=${nc.vlan},type=${nc.type},rate=${params.rate}`;