mirror of
				https://github.com/Telecominfraproject/wlan-cloud-owprov.git
				synced 2025-10-31 18:48:09 +00:00 
			
		
		
		
	Adding variableBlock support & DB refactor.
This commit is contained in:
		| @@ -299,4 +299,14 @@ namespace OpenWifi { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     template <typename Member, typename Rec, typename DB > bool CreateMove(const Poco::JSON::Object::Ptr & RawObj, const char *fieldname, Member T, Rec & Existing, std::string &From, std::string &To, DB & TheDB) { | ||||
|         if(RawObj->has(fieldname)) { | ||||
|             From = Existing.*T; | ||||
|             To = RawObj->get(fieldname).toString(); | ||||
|             if(!To.empty() && !TheDB.Exists("id",To)) | ||||
|                 return false; | ||||
|             Existing.*T=To; | ||||
|         } | ||||
|         return true; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stephb9959
					stephb9959