changeset 6349:c1a672b1ad85

Document post once functions.
author John Rouillard <rouilj@ieee.org>
date Sat, 27 Mar 2021 00:03:30 -0400
parents 510a94a2e6e7
children 6a69584d117e
files roundup/rest.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/roundup/rest.py	Sun Mar 21 21:41:40 2021 -0400
+++ b/roundup/rest.py	Sat Mar 27 00:03:30 2021 -0400
@@ -1064,6 +1064,8 @@
     @Routing.route("/data/<:class_name>/@poe", 'POST')
     @_data_decorator
     def get_post_once_exactly(self, class_name, input):
+        """Get the Post Once Exactly token to create a new instance of class
+           See https://tools.ietf.org/html/draft-nottingham-http-poe-00"""
         otks = self.db.Otk
         poe_key = ''.join([random_.choice(chars) for x in range(40)])
         while otks.exists(u2s(poe_key)):
@@ -1108,6 +1110,7 @@
     @Routing.route("/data/<:class_name>/@poe/<:post_token>", 'POST')
     @_data_decorator
     def post_once_exactly_collection(self, class_name, post_token, input):
+        """Post exactly one to the resource named by class_name"""
         otks = self.db.Otk
 
         # remove expired keys so we don't use an expired key

Roundup Issue Tracker: http://roundup-tracker.org/