diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-02 15:32:30 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-02 15:32:30 -0700 |
commit | 4671f21ba969b48a0490457c296d9b585b64c055 (patch) | |
tree | d7edf1d89c785ec0eafa62c4c6f3c8fd53693634 /python/fatcat_web/routes.py | |
parent | 6fa603c92b3329a6e49b8baa0ba68489a0ebfba8 (diff) | |
download | fatcat-4671f21ba969b48a0490457c296d9b585b64c055.tar.gz fatcat-4671f21ba969b48a0490457c296d9b585b64c055.zip |
fix webface changelog; health.json is a pseudo-API
Diffstat (limited to 'python/fatcat_web/routes.py')
-rw-r--r-- | python/fatcat_web/routes.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index 118f402b..2bfb9025 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -501,7 +501,8 @@ def editor_editgroups(ident): @app.route('/changelog', methods=['GET']) def changelog_view(): try: - entries = api.get_changelog(limit=request.args.get('limit')) + #limit = int(request.args.get('limit', 10)) + entries = api.get_changelog() except ApiException as ae: abort(ae.status) return render_template('changelog.html', entries=entries) @@ -618,6 +619,11 @@ def release_citeproc(ident): else: return Response(cite, mimetype="text/plain") +@app.route('/health.json', methods=['GET', 'OPTIONS']) +@crossdomain(origin='*',headers=['access-control-allow-origin','Content-Type']) +def health_json(): + return jsonify({'ok': True}) + ### Auth #################################################################### @@ -732,8 +738,3 @@ def fatcat_photo(): return send_from_directory(os.path.join(app.root_path, 'static'), 'fatcat.jpg', mimetype='image/jpeg') - -@app.route('/health', methods=['GET', 'OPTIONS']) -@crossdomain(origin='*',headers=['access-control-allow-origin','Content-Type']) -def health(): - return jsonify({'ok': True}) |