Allow SUBSCRIBER to delete herself.

This commit is contained in:
stephb9959
2022-03-08 10:53:07 -08:00
parent da1e33b09d
commit dea728234e
2 changed files with 23 additions and 14 deletions

View File

@@ -38,11 +38,14 @@ namespace OpenWifi {
}
void RESTAPI_subuser_handler::DoDelete() {
std::cout << __LINE__ << std::endl;
std::string Id = GetBinding("id", "");
std::cout << __LINE__ << std::endl;
if(Id.empty()) {
return BadRequest(RESTAPI::Errors::MissingUserID);
}
std::cout << __LINE__ << std::endl;
SecurityObjects::UserInfo TargetUser;
if(!StorageService()->SubDB().GetUserById(Id,TargetUser)) {
return NotFound();