diff options
| author | Simon Hanna | 2016-04-02 01:44:39 +0200 |
|---|---|---|
| committer | Simon Hanna | 2016-04-02 02:09:44 +0200 |
| commit | 063a77b4a29827cd1870d01a8e565a05c0247ca4 (patch) | |
| tree | 96ea18e3cf616bf1c40393690389937bc160eeba /src/mailman/rest/root.py | |
| parent | 4f331e67122849fb059d1e4cc4c60dccf1ab7373 (diff) | |
| download | mailman-063a77b4a29827cd1870d01a8e565a05c0247ca4.tar.gz mailman-063a77b4a29827cd1870d01a8e565a05c0247ca4.tar.zst mailman-063a77b4a29827cd1870d01a8e565a05c0247ca4.zip | |
Diffstat (limited to 'src/mailman/rest/root.py')
| -rw-r--r-- | src/mailman/rest/root.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mailman/rest/root.py b/src/mailman/rest/root.py index 988c228e7..707504d1b 100644 --- a/src/mailman/rest/root.py +++ b/src/mailman/rest/root.py @@ -130,6 +130,13 @@ class SystemConfiguration: @public +class Pipelines: + def on_get(self, request, response): + resource = dict(pipelines=list(config.pipelines.keys())) + okay(response, etag(resource)) + + +@public class Reserved: """Top level API for reserved operations. @@ -171,6 +178,10 @@ class TopLevel: if len(segments) <= 2: return SystemConfiguration(*segments[1:]), [] return BadRequest(), [] + elif segments[0] == 'pipelines': + if len(segments) > 1: + return BadRequest(), [] + return Pipelines(), [] else: return NotFound(), [] |
