def get_all_keywords_dashboard(): results = None if request.method == "POST": results = post_request_api("/api/keywords", request.form) else: results = get_request_api("/api/keywords") return render_template("keywords/keywords_all.jinja2", result=results["results"])
def rank_get(): results = None if request.method == "POST": results = post_request_api("/api/rank", request.form) else: results = get_request_api("/api/rank") return render_template("serp/rank.jinja2", result=results["results"], error=results["error"])
def graphs_get(): results = None if request.method == "POST": results = post_request_api("/api/graphs", request.form) else: results = get_request_api("/api/graphs") return render_template("graphs/graphs_all.jinja2", result=results["results"], error=None)
def delete_rank(): id = request.args.get('id') result = post_request_api("/api/rank/delete", {"id": id}) dbAlchemy.session.commit() return redirect(url_for('rank_get'))
def delete_audit_website_full(): id = request.args.get('id') result = post_request_api('/api/audit/website/delete', {"id": id}) return redirect(url_for('dashboard_audit_website'))
def add_audit_website_full(): result = post_request_api('/api/audit/website', request.form) time.sleep(.300) return redirect(url_for('dashboard_audit_website'))
def delete_audit_lighthouse(): id = request.args.get('id') result = post_request_api('/api/audit/lighthouse/score/delete', {"id": id}) return redirect(url_for('dashboard_audit_lighthouse_score'))
def add_audit_lighthouse_score(): result = post_request_api('/api/audit/lighthouse/score', request.form) time.sleep(.300) return redirect(url_for('dashboard_audit_lighthouse_score'))
def delete_graph(): id = request.args.get('id') result = post_request_api("/api/graphs/delete", {"id": id}) return redirect(url_for('graphs_get'))
def delete_keywords(): id = request.args.get('id') result = post_request_api("/api/keywords/delete", {"id": id}) return redirect(url_for('get_all_keywords_dashboard'))