mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 14:10:00 +00:00
Change admin routes from /adminlog and /reports to /admin/log and /admin/reports
This commit is contained in:
parent
d5b8a3a2ae
commit
2e50f14fb7
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue