Adding band to SSIDTP

This commit is contained in:
stephb9959
2022-03-24 11:20:28 -07:00
parent 9cf914ee3b
commit 208e6a8a60

View File

@@ -377,10 +377,11 @@ namespace OpenWifi::RESTAPI_utils {
inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, int &Value) {
std::cout << "Field: " << Field << std::endl ;
if(Obj->isObject(Field)) {
if(Obj->has(Field)) {
Value = Obj->get(Field).extract<int>();
if(std::strcmp(Field,"rssi")==0)
std::cout << "rssi:" << Value << std::endl;
std::cout << "Value: " << Value << std::endl;
} else {
std::cout << "Field: " << Field << std::endl;
}
@@ -388,10 +389,11 @@ namespace OpenWifi::RESTAPI_utils {
inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, int64_t &Value) {
std::cout << "Field: " << Field << std::endl ;
if(Obj->isObject(Field)) {
if(Obj->has(Field)) {
Value = Obj->get(Field).extract<int64_t>();
if(std::strcmp(Field,"rssi")==0)
std::cout << "rssi:" << Value << std::endl;
std::cout << "Value: " << Value << std::endl;
} else {
std::cout << "Field: " << Field << std::endl;
}