import os

from flask import make_response

from src.pages.api.v1 import v1api_bp


@v1api_bp.get("/app_version")
def get_app_version():
    response = make_response(os.getenv("GIT_COMMIT_HASH") or "NOT_FOUND", 200)
    response.headers["Cache-Control"] = "s-maxage=600"
    return response
