from flask import Blueprint, request, url_for, render_template, session,flash
from app.services.appwrite_client import AppWriteClient


ajax_bp = Blueprint("ajax", __name__, url_prefix="/ajax")


@ajax_bp.route("/races", methods=["GET", "POST"])
def races():
    race = request.args.get("race")
    return render_template(f"ajax/race_{race}.html")

@ajax_bp.route("/prof", methods=["GET", "POST"])
def professions():
    prof = request.args.get("prof")
    return render_template(f"ajax/prof_{prof}.html")