Adding operator tables.

This commit is contained in:
stephb9959
2022-04-07 19:52:36 -07:00
parent 4c7d2bff28
commit 1b853b385d
26 changed files with 1432 additions and 47 deletions

View 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);
}
}