Adding preferences.

This commit is contained in:
stephb9959
2021-11-16 19:39:24 -08:00
parent 370d4aca47
commit ef1eb190a2
2 changed files with 6 additions and 1 deletions

View File

@@ -213,7 +213,6 @@ namespace OpenWifi::RESTAPI_utils {
Obj.set(Field,A);
}
template<typename T> void field_to_json(Poco::JSON::Object &Obj,
const char *Field,
const T &V,

View File

@@ -32,7 +32,10 @@ namespace OpenWifi {
Poco::Data::Keywords::use(Id);
Select.execute();
std::cout << " 1:" << R.get<0>() << " 2:" << R.get<1>() << " 3:" << R.get<2>() << std::endl;
Convert(R,P);
return true;
} catch (const Poco::Exception &E) {
Logger_.log(E);
@@ -51,8 +54,11 @@ namespace OpenWifi {
};
P.modified = time(nullptr);
std::string Data = OpenWifi::RESTAPI_utils::to_string(P.data);
std::cout << " >>> " << Data << std::endl;
InsertOrUpdate << ConvertParams(InsertOrReplace),
Poco::Data::Keywords::use(P.id),
Poco::Data::Keywords::use(P.modified),