mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-11-02 19:48:03 +00:00
Adding operator tables.
This commit is contained in:
18
src/RESTAPI/RESTAPI_op_contact_list_handler.cpp
Normal file
18
src/RESTAPI/RESTAPI_op_contact_list_handler.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Created by stephane bourque on 2022-04-07.
|
||||
//
|
||||
|
||||
#include "RESTAPI_op_contact_list_handler.h"
|
||||
#include "RESTAPI_db_helpers.h"
|
||||
|
||||
namespace OpenWifi {
|
||||
void RESTAPI_op_contact_list_handler::DoGet() {
|
||||
auto operatorId= GetParameter("operatorId");
|
||||
|
||||
if(operatorId.empty() || !StorageService()->OperatorDB().Exists("id",operatorId)) {
|
||||
return BadRequest(RESTAPI::Errors::OperatorIdMustExist);
|
||||
}
|
||||
return ListHandlerForOperator<OpContactDB>("contacts", DB_, *this,operatorId);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user