aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/rest/root.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/rest/root.py')
-rw-r--r--src/mailman_pgp/rest/root.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/mailman_pgp/rest/root.py b/src/mailman_pgp/rest/root.py
index 286d9ae..3d0c427 100644
--- a/src/mailman_pgp/rest/root.py
+++ b/src/mailman_pgp/rest/root.py
@@ -5,19 +5,13 @@ REST root.
/lists/ -> List all known encrypted lists.
/lists/<list_id>/ ->
/lists/<list_id>/key -> GET list_public_key
-/lists/<list_id>/archive/key -> GET/POST list_archive_public_key
-
-/users/ -> List all known users of encrypted lists.
-/users/<uid>/ ->
-/users/<uid>/key -> GET/POST user_public_key
-
"""
from mailman.rest.helpers import child
from public import public
+from mailman_pgp.rest.addresses import AllAddresses, AnAddress
from mailman_pgp.rest.lists import AllEncryptedLists, AnEncryptedList
-from mailman_pgp.rest.users import AllUsers, AUser
@public
@@ -31,9 +25,9 @@ class RESTRoot:
return AnEncryptedList(list_id), segments
@child()
- def users(self, context, segments):
+ def addresses(self, context, segments):
if len(segments) == 0:
- return AllUsers(), []
+ return AllAddresses(), []
else:
- uid = segments.pop(0)
- return AUser(uid), segments
+ email = segments.pop(0)
+ return AnAddress(email), segments