sneed
This commit is contained in:
parent
2c5a3dc092
commit
d699cbddfc
2 changed files with 8 additions and 9 deletions
|
@ -964,15 +964,6 @@ def admin_distinguish_comment(c_id, v):
|
||||||
|
|
||||||
return jsonify({"html":html, "api":html})
|
return jsonify({"html":html, "api":html})
|
||||||
|
|
||||||
|
|
||||||
@app.route("/admin/dump_cache", methods=["GET"])
|
|
||||||
@admin_level_required(3)
|
|
||||||
@validate_formkey
|
|
||||||
def admin_dump_cache(v):
|
|
||||||
cache.clear()
|
|
||||||
return jsonify({"message": "Internal cache cleared."})
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/admin/ban_domain", methods=["POST"])
|
@app.route("/admin/ban_domain", methods=["POST"])
|
||||||
@admin_level_required(4)
|
@admin_level_required(4)
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
|
|
|
@ -26,6 +26,14 @@ def user_info(v, username):
|
||||||
user = get_user(username, v=v)
|
user = get_user(username, v=v)
|
||||||
return jsonify(user.json)
|
return jsonify(user.json)
|
||||||
|
|
||||||
|
@app.route("/admin/dump_cache", methods=["GET"])
|
||||||
|
@admin_level_required(3)
|
||||||
|
@validate_formkey
|
||||||
|
def admin_dump_cache(v):
|
||||||
|
cache.delete_memoized(leaderboard)
|
||||||
|
cache.clear()
|
||||||
|
return jsonify({"message": "Internal cache cleared."})
|
||||||
|
|
||||||
@app.route("/leaderboard", methods=["GET"])
|
@app.route("/leaderboard", methods=["GET"])
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def leaderboard(v):
|
def leaderboard(v):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue