summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/routes.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-04-03 19:40:07 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-04-03 19:40:07 -0700
commit855f2c44de8a900766bdc1f80fb8d3b54e0871e9 (patch)
treef53bc5da87fc78e8586fbe93a20992539d64537f /python/fatcat_web/routes.py
parentca59441dab7bd99645c98c03dceb314c5d9fae5d (diff)
downloadfatcat-855f2c44de8a900766bdc1f80fb8d3b54e0871e9.tar.gz
fatcat-855f2c44de8a900766bdc1f80fb8d3b54e0871e9.zip
editor-specific annotation view
Diffstat (limited to 'python/fatcat_web/routes.py')
-rw-r--r--python/fatcat_web/routes.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index bce3c529..7b406ff5 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -357,8 +357,6 @@ def editgroup_create_annotation(ident):
abort(ae.status)
return redirect('/editgroup/{}'.format(ident))
-# XXX: editor's annotations
-
@app.route('/editgroup/<ident>/accept', methods=['POST'])
@login_required
def editgroup_accept(ident):
@@ -433,6 +431,16 @@ def editor_editgroups(ident):
return render_template('editor_editgroups.html', editor=editor,
editgroups=editgroups)
+@app.route('/editor/<ident>/annotations', methods=['GET'])
+def editor_annotations(ident):
+ try:
+ editor = api.get_editor(ident)
+ annotations = api.get_editor_annotations(ident, limit=50)
+ except ApiException as ae:
+ abort(ae.status)
+ return render_template('editor_annotations.html', editor=editor,
+ annotations=annotations)
+
@app.route('/changelog', methods=['GET'])
def changelog_view():
try: