summaryrefslogtreecommitdiff
path: root/src/mailman/rest/lists.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rest/lists.py')
-rw-r--r--src/mailman/rest/lists.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mailman/rest/lists.py b/src/mailman/rest/lists.py
index 9d3865d00..0103022e7 100644
--- a/src/mailman/rest/lists.py
+++ b/src/mailman/rest/lists.py
@@ -42,6 +42,7 @@ from mailman.rest.configuration import ListConfiguration
from mailman.rest.helpers import (
CollectionMixin, etag, no_content, path_to, restish_matcher)
from mailman.rest.members import AMember, MemberCollection
+from mailman.rest.moderation import HeldMessages
from mailman.rest.validator import Validator
@@ -166,6 +167,13 @@ class AList(_ListBase):
return http.not_found()
return ListConfiguration(self._mlist, attribute)
+ @resource.child()
+ def held(self, request, segments):
+ """Return a list of held messages for the mailign list."""
+ if self._mlist is None:
+ return http.not_found()
+ return HeldMessages(self._mlist)
+
class AllLists(_ListBase):