mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-06 20:55:10 +01:00
Cleanup and better API endpoint
This commit is contained in:
10
digimarks.py
10
digimarks.py
@@ -517,15 +517,9 @@ def bookmarks_json(userkey, filtermethod=None, sortmethod=None):
|
|||||||
}
|
}
|
||||||
return jsonify(the_data)
|
return jsonify(the_data)
|
||||||
|
|
||||||
#@app.route('/<userkey>/<urlhash>')
|
|
||||||
#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('/api/v1/<userkey>/<urlhash>')
|
||||||
@app.route('/<userkey>/<urlhash>/json')
|
def bookmark_json(userkey, urlhash):
|
||||||
def viewbookmarkjson(userkey, urlhash):
|
|
||||||
""" Serialise bookmark to json """
|
""" Serialise bookmark to json """
|
||||||
bookmark = Bookmark.select(
|
bookmark = Bookmark.select(
|
||||||
Bookmark.url_hash == urlhash,
|
Bookmark.url_hash == urlhash,
|
||||||
|
|||||||
Reference in New Issue
Block a user