diff --git a/api_service/api_server.py b/api_service/api_server.py index 63d2206..d083b35 100644 --- a/api_service/api_server.py +++ b/api_service/api_server.py @@ -522,6 +522,10 @@ app.mount("/dashboard/api", dashboard_api_app) # Mount the new dashboard API try: from webhook_endpoints import router as webhook_router # Relative import app.mount("/webhook", webhook_router) # Mount directly on the main app for simplicity + # After mounting the webhook router + log.info("Available routes in webhook_router:") + for route in webhook_router.routes: + log.info(f" {route.path} - {route.name} - {route.methods}") # Or, if you prefer to nest it under /api: # api_app.include_router(webhook_router, prefix="/webhooks", tags=["Webhooks"]) log.info("Webhook endpoints loaded and mounted successfully at /webhook") diff --git a/api_service/webhook_endpoints.py b/api_service/webhook_endpoints.py index 693c741..eb9c9fb 100644 --- a/api_service/webhook_endpoints.py +++ b/api_service/webhook_endpoints.py @@ -333,3 +333,7 @@ async def webhook_gitlab( else: log.error(f"Failed to send GitLab webhook notification for repo {repo_db_id}. Error: {send_result.get('message')}") return {"status": "error", "message": f"Webhook received, but notification failed: {send_result.get('message')}"} + +@router.get("/test") +async def test_webhook_router(): + return {"message": "Webhook router is working. Or mounted, at least."} \ No newline at end of file