1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-10-31 22:55:53 +00:00

Change admin routes from /adminlog and /reports to /admin/log and /admin/reports

This commit is contained in:
mreweilk 2017-08-14 13:30:17 -04:00
parent d5b8a3a2ae
commit 2e50f14fb7

View file

@ -6,7 +6,7 @@ from nyaa.extensions import db
bp = flask.Blueprint('admin', __name__) bp = flask.Blueprint('admin', __name__)
@bp.route('/adminlog', endpoint='log', methods=['GET']) @bp.route('/admin/log', endpoint='log', methods=['GET'])
def view_adminlog(): def view_adminlog():
if not flask.g.user or not flask.g.user.is_moderator: if not flask.g.user or not flask.g.user.is_moderator:
flask.abort(403) flask.abort(403)
@ -20,7 +20,7 @@ def view_adminlog():
adminlog=logs) adminlog=logs)
@bp.route('/reports', endpoint='reports', methods=['GET', 'POST']) @bp.route('/admin/reports', endpoint='reports', methods=['GET', 'POST'])
def view_reports(): def view_reports():
if not flask.g.user or not flask.g.user.is_moderator: if not flask.g.user or not flask.g.user.is_moderator:
flask.abort(403) flask.abort(403)