From 9794f75c966918cdecbf32c0d1e9f20f20d64854 Mon Sep 17 00:00:00 2001 From: Nikolai Kristiansen Date: Tue, 1 Aug 2017 16:02:23 +0200 Subject: [PATCH] fix flask usage --- mailman_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailman_api.py b/mailman_api.py index a7256d3..59f0658 100644 --- a/mailman_api.py +++ b/mailman_api.py @@ -87,7 +87,7 @@ def list_lists(): return jsonify({'lists': lists}) -@app.route('/', method='PUT') +@app.route('/', methods=['PUT']) def subscribe(list_name): """ Adds a new subscriber to the list called 'list_name' @@ -121,7 +121,7 @@ def subscribe(list_name): return jsonify(True) -@app.route('/', method='DELETE') +@app.route('/', methods=['DELETE']) def unsubscribe(list_name): """ Unsubsribe an email address from the mailing list.