From 41bbb438b1b56e7837bfaf459d0d69381172e5df Mon Sep 17 00:00:00 2001 From: Simon Hanna Date: Sat, 2 Apr 2016 01:45:06 +0200 Subject: Expose chains through the rest interface --- src/mailman/rest/root.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mailman/rest/root.py') diff --git a/src/mailman/rest/root.py b/src/mailman/rest/root.py index 707504d1b..bc5bace08 100644 --- a/src/mailman/rest/root.py +++ b/src/mailman/rest/root.py @@ -136,6 +136,13 @@ class Pipelines: okay(response, etag(resource)) +@public +class Chains: + def on_get(self, request, response): + resource = dict(chains=list(config.chains.keys())) + okay(response, etag(resource)) + + @public class Reserved: """Top level API for reserved operations. @@ -182,6 +189,10 @@ class TopLevel: if len(segments) > 1: return BadRequest(), [] return Pipelines(), [] + elif segments[0] == 'chains': + if len(segments) > 1: + return BadRequest(), [] + return Chains(), [] else: return NotFound(), [] -- cgit v1.2.3-70-g09d2