fix bug in net create

This commit is contained in:
Arthur Lu 2023-11-09 20:46:50 +00:00
parent 0c7b0309c7
commit 1e4413b9b1

View File

@ -63,7 +63,7 @@ router.post("/:netid/create", async (req, res) => {
return; return;
} }
// setup action // 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 = {}; let action = {};
if (params.type === "lxc") { 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}`; 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}`;