mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
fix controller network post endpoint
This commit is contained in:
parent
03377a6f3d
commit
db3df70b59
1 changed files with 12 additions and 0 deletions
|
@ -960,6 +960,18 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
|
||||||
sv6.Put(oldAndBustedNetworkCreatePath, createNewNetworkOldAndBusted);
|
sv6.Put(oldAndBustedNetworkCreatePath, createNewNetworkOldAndBusted);
|
||||||
sv6.Post(oldAndBustedNetworkCreatePath, createNewNetworkOldAndBusted);
|
sv6.Post(oldAndBustedNetworkCreatePath, createNewNetworkOldAndBusted);
|
||||||
|
|
||||||
|
auto networkPost = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
||||||
|
auto networkID = req.matches[1].str();
|
||||||
|
uint64_t nwid = Utils::hexStrToU64(networkID.c_str());
|
||||||
|
|
||||||
|
res.status = 200;
|
||||||
|
setContent(req, res, networkUpdateFromPostData(nwid, req.body));
|
||||||
|
};
|
||||||
|
s.Put(networkPath, networkPost);
|
||||||
|
s.Post(networkPath, networkPost);
|
||||||
|
sv6.Put(networkPath, networkPost);
|
||||||
|
sv6.Post(networkPath, networkPost);
|
||||||
|
|
||||||
auto networkDelete = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
auto networkDelete = [&, setContent](const httplib::Request &req, httplib::Response &res) {
|
||||||
auto networkID = req.matches[1].str();
|
auto networkID = req.matches[1].str();
|
||||||
uint64_t nwid = Utils::hexStrToU64(networkID.c_str());
|
uint64_t nwid = Utils::hexStrToU64(networkID.c_str());
|
||||||
|
|
Loading…
Add table
Reference in a new issue