Add Krock's mod search to meta importer to find forum topic ID

This commit is contained in:
rubenwardy
2018-05-12 18:50:09 +01:00
parent db3d63d91a
commit 38ed03f49a
3 changed files with 68 additions and 3 deletions

View File

@@ -13,7 +13,9 @@ from .utils import *
@app.route("/tasks/getmeta/new/", methods=["POST"])
@login_required
def new_getmeta_page():
aresult = getMeta.delay(request.args.get("url"))
author = request.args.get("author")
author = current_user.forums_username if author is None else author
aresult = getMeta.delay(request.args.get("url"), author)
return jsonify({
"poll_url": url_for("check_task", id=aresult.id),
})