From ac41598bb070728b7005397e02162d38b400550b Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 29 Mar 2018 19:23:12 -0700 Subject: [PATCH] Add some more give_token. I probably should just put it as a global pre-request hook. --- .../etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontends/etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py b/frontends/etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py index ab1f304..e333a68 100644 --- a/frontends/etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py +++ b/frontends/etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py @@ -91,6 +91,7 @@ def get_tags_json(specific_tag_name=None): @site.route('/tags/create_tag', methods=['POST']) @decorators.catch_etiquette_exception +@session_manager.give_token @decorators.required_fields(['tagname'], forbid_whitespace=True) def post_tag_create(): ''' @@ -104,6 +105,7 @@ def post_tag_create(): @site.route('/tags/delete_synonym', methods=['POST']) @decorators.catch_etiquette_exception +@session_manager.give_token @decorators.required_fields(['tagname'], forbid_whitespace=True) def post_tag_delete_synonym(): ''' @@ -124,6 +126,7 @@ def post_tag_delete_synonym(): @site.route('/tags/delete_tag', methods=['POST']) @decorators.catch_etiquette_exception +@session_manager.give_token @decorators.required_fields(['tagname'], forbid_whitespace=True) def post_tag_delete(): '''