2026-01-08 01:00:26 +10:30
|
|
|
"""API package."""
|
|
|
|
|
from flask import Blueprint
|
2026-01-15 03:40:29 +10:30
|
|
|
from gatehouse_app.utils.response import api_response
|
2026-01-08 01:00:26 +10:30
|
|
|
|
|
|
|
|
# Create main API blueprint
|
|
|
|
|
api_bp = Blueprint("api", __name__)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@api_bp.route("/health", methods=["GET"])
|
|
|
|
|
def health_check():
|
|
|
|
|
"""Health check endpoint."""
|
|
|
|
|
return api_response(
|
|
|
|
|
data={"status": "healthy", "service": "authy2-backend"},
|
|
|
|
|
message="Service is running",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def register_api_blueprints(app):
|
|
|
|
|
"""Register all API blueprints."""
|
2026-01-15 03:40:29 +10:30
|
|
|
from gatehouse_app.api.v1 import api_v1_bp
|
2026-01-08 01:00:26 +10:30
|
|
|
|
|
|
|
|
# Register versioned API blueprints
|
|
|
|
|
app.register_blueprint(api_bp, url_prefix="/api")
|
|
|
|
|
app.register_blueprint(api_v1_bp, url_prefix="/api/v1")
|