mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-11-01 19:17:47 +00:00
Initial
This commit is contained in:
@@ -73,7 +73,20 @@ namespace OpenWifi{
|
||||
}
|
||||
|
||||
ProvObjects::Entity E;
|
||||
if(Storage()->EntityDB().DeleteRecord("id",UUID)) {
|
||||
|
||||
std::string f{"id"};
|
||||
if(!Storage()->EntityDB().GetRecord(f,UUID,E)) {
|
||||
NotFound(Request, Response);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!E.children.empty()) {
|
||||
BadRequest(Request, Response, "Entity still has children.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(Storage()->EntityDB().DeleteRecord(f,UUID)) {
|
||||
Storage()->EntityDB().DeleteChild(f,E.parent,UUID);
|
||||
OK(Request, Response);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ namespace ORM {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string ConvertParams(const std::string & S) const {
|
||||
[[nodiscard]] std::string ConvertParams(const std::string & S) const {
|
||||
std::string R;
|
||||
|
||||
R.reserve(S.size()*2+1);
|
||||
@@ -299,8 +299,8 @@ namespace ORM {
|
||||
return R;
|
||||
}
|
||||
|
||||
virtual void Convert( RecordTuple &in , RecordType &out);
|
||||
virtual void Convert( RecordType &in , RecordTuple &out);
|
||||
void Convert( RecordTuple &in , RecordType &out);
|
||||
void Convert( RecordType &in , RecordTuple &out);
|
||||
|
||||
bool CreateRecord( RecordType & R) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user