aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-09-06 18:04:40 +0200
committerneodarz <neodarz@neodarz.net>2019-09-06 18:04:40 +0200
commit1b922f7319f821fe3daf302a8c68131aaa94f586 (patch)
treedebf82b507174f158b9cb4e030b3f82d31c44a64 /db
parent3185dd695d58bb96672d4f33c4528bf8b361707f (diff)
downloadumosapicpp-1b922f7319f821fe3daf302a8c68131aaa94f586.tar.xz
umosapicpp-1b922f7319f821fe3daf302a8c68131aaa94f586.zip
Change code to use Restbed
Diffstat (limited to '')
-rw-r--r--db/uobject.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/db/uobject.cpp b/db/uobject.cpp
index 6401307..25b13e6 100644
--- a/db/uobject.cpp
+++ b/db/uobject.cpp
@@ -103,8 +103,10 @@ std::string uobject::remove(std::string collection, std::string oid, struct json
json_object_object_add(json_id, "$oid", json_oid);
json_object_object_add(jsonObject, "_id", json_id);
json_object_object_add(jsonObject, "datas", {});
+ return json_object_to_json_string_ext(jsonObject, JSON_C_TO_STRING_SPACED | JSON_C_TO_STRING_PRETTY);
+ } else {
+ return "0";
}
- return json_object_to_json_string_ext(jsonObject, JSON_C_TO_STRING_SPACED | JSON_C_TO_STRING_PRETTY);
}
std::string uobject::searchKeyValue(std::string collection, std::string key, std::string value, struct json_object* jsonArray) {