[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -update rest plugin; still does not supp
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -update rest plugin; still does not support transactional API |
Date: |
Thu, 06 Oct 2022 06:36:47 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 59f5649fa -update rest plugin; still does not support transactional API
59f5649fa is described below
commit 59f5649fa781faede38e7cab66398da295f3c615
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Thu Oct 6 13:36:40 2022 +0900
-update rest plugin; still does not support transactional API
---
src/namestore/plugin_rest_namestore.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/namestore/plugin_rest_namestore.c
b/src/namestore/plugin_rest_namestore.c
index d93b2e185..efd309d6c 100644
--- a/src/namestore/plugin_rest_namestore.c
+++ b/src/namestore/plugin_rest_namestore.c
@@ -35,10 +35,15 @@
#include <jansson.h>
/**
- * Namestore Namespace
+ * Namestore namespace
*/
#define GNUNET_REST_API_NS_NAMESTORE "/namestore"
+/**
+ * Namestore import API namespace
+ */
+#define GNUNET_REST_API_NS_NAMESTORE_IMPORT "/namestore/import"
+
/**
* Error message Unknown Error
*/
@@ -773,7 +778,7 @@ namestore_import (struct GNUNET_REST_RequestHandle
*con_handle,
char term_data[handle->rest_handle->data_size + 1];
// set zone to name if given
- if (strlen (GNUNET_REST_API_NS_NAMESTORE) + 1 >= strlen (handle->url))
+ if (strlen (GNUNET_REST_API_NS_NAMESTORE_IMPORT) + 1 >= strlen (handle->url))
{
handle->response_code = MHD_HTTP_NOT_FOUND;
handle->emsg = GNUNET_strdup (GNUNET_REST_IDENTITY_NOT_FOUND);
@@ -782,7 +787,7 @@ namestore_import (struct GNUNET_REST_RequestHandle
*con_handle,
}
ego_entry = NULL;
- egoname = &handle->url[strlen (GNUNET_REST_API_NS_NAMESTORE) + 1];
+ egoname = &handle->url[strlen (GNUNET_REST_API_NS_NAMESTORE_IMPORT) + 1];
ego_entry = get_egoentry_namestore (handle, egoname);
if (NULL == ego_entry)
@@ -1183,8 +1188,8 @@ rest_process_request (struct GNUNET_REST_RequestHandle
*rest_handle,
struct GNUNET_REST_RequestHandlerError err;
static const struct GNUNET_REST_RequestHandler handlers[] =
{ { MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_NAMESTORE, &namestore_get },
- //{ MHD_HTTP_METHOD_POST, GNUNET_REST_API_NS_NAMESTORE, &namestore_add },
- { MHD_HTTP_METHOD_POST, GNUNET_REST_API_NS_NAMESTORE, &namestore_import },
+ { MHD_HTTP_METHOD_POST, GNUNET_REST_API_NS_NAMESTORE_IMPORT,
&namestore_import },
+ { MHD_HTTP_METHOD_POST, GNUNET_REST_API_NS_NAMESTORE, &namestore_add },
{ MHD_HTTP_METHOD_PUT, GNUNET_REST_API_NS_NAMESTORE, &namestore_update },
{ MHD_HTTP_METHOD_DELETE, GNUNET_REST_API_NS_NAMESTORE,
&namestore_delete },
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: -update rest plugin; still does not support transactional API,
gnunet <=