Adding tree import.

This commit is contained in:
stephb9959
2021-09-07 21:38:36 -07:00
parent bed442f4b8
commit dc720d96ee
2 changed files with 2 additions and 1 deletions

View File

@@ -138,6 +138,7 @@ namespace OpenWifi{
std::cout << __LINE__ << std::endl;
for(const auto &i:C.configuration) {
Poco::JSON::Parser P;
std::cout << "Config:>>>" << std::endl << i.configuration << std::endl << "<<<" << std::endl;
auto T = P.parse(i.configuration).extract<Poco::JSON::Object>();
}
std::cout << __LINE__ << std::endl;

View File

@@ -269,7 +269,7 @@ locationcount() {
}
addconfig() {
payload="{ \"name\" : \"$1\", \"deviceTypes\" : [\"*\"], \"configuration\" : [ { \"name\" : \"radios\" , \"weight\" : 100, \"radios\": [{ \"band\": \"5G\", \"channel\": 52, \"channel-mode\": \"HE\", \"channel-width\": 80, \"country\": \"CA\" }, { \"band\": \"2G\", \"channel\": 11, \"channel-mode\": \"HE\", \"channel-width\": 20, \"country\": \"CA\" }] }] }"
payload="{ \"name\" : \"$1\", \"deviceTypes\" : [\"*\"], \"configuration\" : [ { \"name\" : \"radios\" , \"weight\" : 100, \"configuration\" : { \"radios\": [{ \"band\": \"5G\", \"channel\": 52, \"channel-mode\": \"HE\", \"channel-width\": 80, \"country\": \"CA\" }, { \"band\": \"2G\", \"channel\": 11, \"channel-mode\": \"HE\", \"channel-width\": 20, \"country\": \"CA\" } ] } }] }"
curl ${FLAGS} -X POST "https://${OWPROV}/api/v1/configurations/1" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}" \