Adding operators, subdevices, serviceclasses.

This commit is contained in:
stephb9959
2022-04-07 07:12:36 -07:00
parent 3f6108bfd9
commit a113cd0996
28 changed files with 1188 additions and 41 deletions

View File

@@ -0,0 +1,19 @@
//
// Created by stephane bourque on 2022-04-06.
//
#include "RESTAPI_service_class_list_handler.h"
#include "RESTAPI/RESTAPI_db_helpers.h"
namespace OpenWifi {
void RESTAPI_service_class_list_handler::DoGet() {
auto operatorId= GetParameter("operatorId");
if(operatorId.empty() || !StorageService()->OperatorDB().Exists("id",operatorId)) {
return BadRequest(RESTAPI::Errors::OperatorIdMustExist);
}
return ListHandlerForOperator<ServiceClassDB>("serviceClasses", DB_, *this,operatorId);
}
}