123
This commit is contained in:
parent
6bc445f249
commit
e3decb81d8
@ -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")
|
||||
|
@ -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."}
|
Loading…
x
Reference in New Issue
Block a user