aboutsummaryrefslogtreecommitdiff
path: root/api/umosapi.cpp
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-09-11 16:31:02 +0200
committerneodarz <neodarz@neodarz.net>2019-09-11 16:31:02 +0200
commit4a1a02b55e6d1b55e44560c728a47875411da333 (patch)
tree4f9c25e17d4511526e7afc391e2ab8f3ae80f4e7 /api/umosapi.cpp
parenta4f2b4808e79cf333d2ec2c7c72c1ac8f807c27b (diff)
downloadumosapicpp-4a1a02b55e6d1b55e44560c728a47875411da333.tar.xz
umosapicpp-4a1a02b55e6d1b55e44560c728a47875411da333.zip
Add 200 responses to some endpoints
Diffstat (limited to '')
-rw-r--r--api/umosapi.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/api/umosapi.cpp b/api/umosapi.cpp
index bd58f8a..989dbe2 100644
--- a/api/umosapi.cpp
+++ b/api/umosapi.cpp
@@ -275,11 +275,13 @@ void UmosapiService::Api::createResource() {
UmosapiService::Api::set_method_handler("GET", retrieveAll);
UmosapiService::Api::produce("application/json");
UmosapiService::Api::parameter("mcollection", "Name of the collection where the uobject are located");
+ UmosapiService::Api::response("200", "All is fine", "UObject", "array");
UmosapiService::Api::set_error_handler(&resource_error_handler);
UmosapiService::Api::set_method_handler("POST", addUObject);
UmosapiService::Api::consume("application/json");
UmosapiService::Api::parameter("mcollection", "Name of the collection where the uobject are located");
UmosapiService::Api::parameter("body", "UObject to add", "UObjectSended");
+ UmosapiService::Api::response("200", "All is fine", "UObject");
UmosapiService::Api::set_error_handler(&resource_error_handler);
UmosapiService::Api::publish();
@@ -288,6 +290,7 @@ void UmosapiService::Api::createResource() {
UmosapiService::Api::produce("application/json");
UmosapiService::Api::parameter("mcollection", "Name of the collection where the uobject are located" );
UmosapiService::Api::parameter("oid", "MongoDB oid of the uobject");
+ UmosapiService::Api::response("200", "All is fine", "UObject");
UmosapiService::Api::set_error_handler(&resource_error_handler);
UmosapiService::Api::publish();
@@ -297,6 +300,7 @@ void UmosapiService::Api::createResource() {
UmosapiService::Api::parameter("mcollection", "Name of the collection where the uobject are located");
UmosapiService::Api::parameter("key", "Key of uobject to search, ex: kill or total.kill");
UmosapiService::Api::parameter("value", "Value of uobject to search, ex: 42");
+ UmosapiService::Api::response("200", "All is fine", "UObject");
UmosapiService::Api::set_error_handler(&resource_error_handler);
UmosapiService::Api::publish();