diff options
| author | Barry Warsaw | 2015-04-15 22:52:34 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-04-15 22:52:34 -0400 |
| commit | 546b25e343c3c2aafbd29de440c1188711e98870 (patch) | |
| tree | c4d2270bce3862e71a252d941e3942860a8c8565 /src/mailman/rest/helpers.py | |
| parent | 2f2e4aa6684a0930395d56a77078aa39ee7786a5 (diff) | |
| parent | 08f457799cd36349a4fd22642f4c05b4eabb306d (diff) | |
| download | mailman-546b25e343c3c2aafbd29de440c1188711e98870.tar.gz mailman-546b25e343c3c2aafbd29de440c1188711e98870.tar.zst mailman-546b25e343c3c2aafbd29de440c1188711e98870.zip | |
Plumb the subscription policy through to the membership subscription REST API.
Diffstat (limited to 'src/mailman/rest/helpers.py')
| -rw-r--r-- | src/mailman/rest/helpers.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mailman/rest/helpers.py b/src/mailman/rest/helpers.py index edd57b76b..c737fcbc7 100644 --- a/src/mailman/rest/helpers.py +++ b/src/mailman/rest/helpers.py @@ -300,6 +300,12 @@ def not_found(response, body=b'404 Not Found'): response.body = body +def accepted(response, body=None): + response.status = falcon.HTTP_202 + if body is not None: + response.body = body + + def bad_request(response, body='400 Bad Request'): response.status = falcon.HTTP_400 if body is not None: |
