mirror of
https://github.com/Telecominfraproject/wlan-cloud-analytics.git
synced 2026-01-27 02:22:21 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user