From cac31e40c93446e4ba4b1c57e73298db3d2f1cd7 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Sat, 17 Mar 2018 16:18:53 +0100 Subject: [PATCH] Cleanup and better API endpoint --- digimarks.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/digimarks.py b/digimarks.py index 557eb9f..b5f5742 100644 --- a/digimarks.py +++ b/digimarks.py @@ -517,15 +517,9 @@ def bookmarks_json(userkey, filtermethod=None, sortmethod=None): } return jsonify(the_data) -#@app.route('//') -#def viewbookmark(userkey, urlhash): -# """ Bookmark detail view """ -# bookmark = Bookmark.select(Bookmark.url_hash == urlhash, Bookmark.userkey == userkey) -# return render_template('viewbookmark.html', userkey=userkey, bookmark=bookmark) - -@app.route('///json') -def viewbookmarkjson(userkey, urlhash): +@app.route('/api/v1//') +def bookmark_json(userkey, urlhash): """ Serialise bookmark to json """ bookmark = Bookmark.select( Bookmark.url_hash == urlhash,