diff options
author | neodarz <neodarz@neodarz.net> | 2019-09-06 18:04:40 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2019-09-06 18:04:40 +0200 |
commit | 1b922f7319f821fe3daf302a8c68131aaa94f586 (patch) | |
tree | debf82b507174f158b9cb4e030b3f82d31c44a64 /db/uobject.cpp | |
parent | 3185dd695d58bb96672d4f33c4528bf8b361707f (diff) | |
download | umosapicpp-1b922f7319f821fe3daf302a8c68131aaa94f586.tar.xz umosapicpp-1b922f7319f821fe3daf302a8c68131aaa94f586.zip |
Change code to use Restbed
Diffstat (limited to 'db/uobject.cpp')
-rw-r--r-- | db/uobject.cpp | 4 |
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) { |