stephb9959
2023-09-12 14:24:14 -07:00
parent 5390d1fcec
commit 797a7f20bc
2 changed files with 20 additions and 3 deletions

View File

@@ -8,7 +8,7 @@
namespace OpenWifi {
void RESTAPI_openroaming_gr_acct_handler::DoGet() {
auto Account = GetBinding("account","");
auto Account = GetBinding("id","");
if(Account.empty()) {
return BadRequest(RESTAPI::Errors::MissingOrInvalidParameters);
}
@@ -21,7 +21,7 @@ namespace OpenWifi {
}
void RESTAPI_openroaming_gr_acct_handler::DoDelete() {
auto Account = GetBinding("account","");
auto Account = GetBinding("id","");
if(Account.empty()) {
return BadRequest(RESTAPI::Errors::MissingOrInvalidParameters);
}
@@ -38,7 +38,7 @@ namespace OpenWifi {
}
void RESTAPI_openroaming_gr_acct_handler::DoPost() {
auto Account = GetBinding("account","");
auto Account = GetBinding("id","");
if(Account.empty()) {
return BadRequest(RESTAPI::Errors::MissingOrInvalidParameters);
}
@@ -78,6 +78,10 @@ namespace OpenWifi {
return BadRequest(RESTAPI::Errors::CannotCreateCSR);
}
NewObject.CSR = R.CSR;
NewObject.CSRPublicKey = R.PublicKey;
NewObject.CSRPrivateKey = R.PrivateKey;
ProvObjects::CreateObjectInfo(RawObject,UserInfo_.userinfo,NewObject.info);
if(DB_.CreateRecord(NewObject)) {