From 84599b44f7aa7e0aa9f5ee099e22a7612a54390a Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 18 Mar 2018 15:59:58 -0700 Subject: [PATCH] Store author for bookmark creation. --- .../etiquette_flask/endpoints/bookmark_endpoints.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontends/etiquette_flask/etiquette_flask/endpoints/bookmark_endpoints.py b/frontends/etiquette_flask/etiquette_flask/endpoints/bookmark_endpoints.py index f1104d3..3eb0097 100644 --- a/frontends/etiquette_flask/etiquette_flask/endpoints/bookmark_endpoints.py +++ b/frontends/etiquette_flask/etiquette_flask/endpoints/bookmark_endpoints.py @@ -58,7 +58,8 @@ def get_bookmarks_json(): def post_bookmarks_create(): url = request.form['url'] title = request.form.get('title', None) - bookmark = common.P.new_bookmark(url=url, title=title) + user = session_manager.get(request).user + bookmark = common.P.new_bookmark(url=url, title=title, author=user) response = etiquette.jsonify.bookmark(bookmark) response = jsonify.make_json_response(response) return response