stephb9959
2022-11-27 21:29:43 -08:00
parent 24da84e6ea
commit 1348be3011
3 changed files with 3 additions and 5 deletions

2
build
View File

@@ -1 +1 @@
13
14

View File

@@ -81,11 +81,9 @@ namespace OpenWifi {
void VenueCoordinator::RetireBoard(const AnalyticsObjects::BoardInfo &B) {
Logger().error(fmt::format("Venue board '{}' is no longer in the system. Retiring its associated board.", B.venueList[0].name));
/*
StopBoard(B.info.id);
StorageService()->BoardsDB().DeleteRecord("id",B.info.id);
StorageService()->TimePointsDB().DeleteRecords(fmt::format(" boardId='{}' ", B.info.id));
*/
}
bool VenueCoordinator::GetDevicesForBoard(const AnalyticsObjects::BoardInfo &B, std::vector<uint64_t> & Devices, bool & VenueExists) {

View File

@@ -57,15 +57,15 @@ namespace OpenWifi::SDK::Prov {
bool Exists(RESTAPIHandler *client, const std::string &VenueId, bool & Exists) {
std::string EndPoint = "/api/v1/venue/" + VenueId ;
Exists = true;
Exists = false;
auto API = OpenAPIRequestGet(uSERVICE_PROVISIONING, EndPoint, {} , 60000);
auto CallResponse = Poco::makeShared<Poco::JSON::Object>();
auto ResponseStatus = API.Do(CallResponse, client==nullptr ? "" : client->UserInfo_.webtoken.access_token_);
if(ResponseStatus == Poco::Net::HTTPServerResponse::HTTP_OK) {
Exists = true;
return true;
} else if (ResponseStatus == Poco::Net::HTTPResponse::HTTP_NOT_FOUND) {
Exists = false;
return true;
}
return false;