mirror of
				https://github.com/Telecominfraproject/wlan-cloud-owprov.git
				synced 2025-10-31 18:48:09 +00:00 
			
		
		
		
	Add automatic location creation on venue
This commit is contained in:
		| @@ -239,12 +239,22 @@ namespace OpenWifi{ | ||||
|         } | ||||
|  | ||||
|         std::string ErrorText; | ||||
|         auto ObjectsToCreate = CreateObjects(NewObject, *this, ErrorText); | ||||
|  | ||||
|         auto ObjectsCreated = CreateObjects(NewObject, *this, ErrorText); | ||||
|         if(!ErrorText.empty()) { | ||||
|             return BadRequest(ErrorText); | ||||
|         } | ||||
|  | ||||
|         if(!ObjectsCreated.empty()) { | ||||
|             if(!ObjectsCreated.empty()) { | ||||
|                 auto it = ObjectsCreated.find("location"); | ||||
|                 if(it!=ObjectsCreated.end()) { | ||||
|                     MoveFromLocation=""; | ||||
|                     MoveToLocation=it->second; | ||||
|                     Existing.location=MoveToLocation; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         if(StorageService()->VenueDB().UpdateRecord("id", UUID, Existing)) { | ||||
|             MoveUsage(StorageService()->ContactDB(),DB_,MoveFromContacts, MoveToContacts, Existing.info.id); | ||||
|             MoveUsage(StorageService()->LocationDB(),DB_,MoveFromLocation, MoveToLocation, Existing.info.id); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stephb9959
					stephb9959