1
0
mirror of https://github.com/aquatix/digimarks.git synced 2025-12-06 23:05:10 +01:00

Fix for json response of single bookmark

This commit is contained in:
2016-08-02 19:30:08 +02:00
parent 62145ecfe2
commit cfbab3f98b

View File

@@ -261,8 +261,8 @@ def bookmarks(userkey, sortmethod = None):
@app.route('/<userkey>/<urlhash>/json')
def viewbookmarkjson(userkey, urlhash):
""" Serialise bookmark to json """
bookmark = Bookmark.select(Bookmark.url_hash == urlhash, Bookmark.userkey == userkey, Bookmark.status == Bookmark.VISIBLE)
return bookmark.to_dict()
bookmark = Bookmark.select(Bookmark.url_hash == urlhash, Bookmark.userkey == userkey, Bookmark.status == Bookmark.VISIBLE)[0]
return jsonify(bookmark.to_dict())
@app.route('/<userkey>/<urlhash>')