diff options
| author | Barry Warsaw | 2014-12-29 17:38:16 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2014-12-29 17:38:16 -0500 |
| commit | 477ac216b4abbd1f96ff4fa3a9583a76ca993dc3 (patch) | |
| tree | a703c59e326bc9b8c2705f3052ca413dc9047f62 /src/mailman/rest/root.py | |
| parent | e86d49d01963640aeac7e27e6c7a49e298e3980f (diff) | |
| download | mailman-477ac216b4abbd1f96ff4fa3a9583a76ca993dc3.tar.gz mailman-477ac216b4abbd1f96ff4fa3a9583a76ca993dc3.tar.zst mailman-477ac216b4abbd1f96ff4fa3a9583a76ca993dc3.zip | |
Diffstat (limited to 'src/mailman/rest/root.py')
| -rw-r--r-- | src/mailman/rest/root.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mailman/rest/root.py b/src/mailman/rest/root.py index 93a8f0086..f29f2ba1d 100644 --- a/src/mailman/rest/root.py +++ b/src/mailman/rest/root.py @@ -80,13 +80,13 @@ class Root: return TopLevel() -class System: +class Versions: def on_get(self, request, response): - """/<api>/system""" + """/<api>/system/versions""" resource = dict( mailman_version=system.mailman_version, python_version=system.python_version, - self_link=path_to('system'), + self_link=path_to('system/versions'), ) okay(response, etag(resource)) @@ -98,11 +98,14 @@ class TopLevel: def system(self, request, segments): """/<api>/system""" if len(segments) == 0: - return System() + # This provides backward compatibility; see /system/versions. + return Versions() elif len(segments) > 1: return BadRequest(), [] elif segments[0] == 'preferences': return ReadOnlyPreferences(system_preferences, 'system'), [] + elif segments[0] == 'versions': + return Versions(), [] else: return NotFound(), [] |
