mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-11-20 11:55:10 +00:00
Adding operators, subdevices, serviceclasses.
This commit is contained in:
19
src/RESTAPI/RESTAPI_service_class_list_handler.cpp
Normal file
19
src/RESTAPI/RESTAPI_service_class_list_handler.cpp
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user