Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 69dbd83c24 | |||
| 69c4f7bb78 |
@@ -2,7 +2,6 @@ use axum::routing::{delete, get, patch, post};
|
|||||||
use axum::Router;
|
use axum::Router;
|
||||||
|
|
||||||
use crate::api::handlers;
|
use crate::api::handlers;
|
||||||
use crate::webhooks;
|
|
||||||
|
|
||||||
pub fn build_router() -> Router {
|
pub fn build_router() -> Router {
|
||||||
Router::new()
|
Router::new()
|
||||||
@@ -175,17 +174,10 @@ pub fn build_router() -> Router {
|
|||||||
"/api/v1/pentest/stats",
|
"/api/v1/pentest/stats",
|
||||||
get(handlers::pentest::pentest_stats),
|
get(handlers::pentest::pentest_stats),
|
||||||
)
|
)
|
||||||
// Webhook endpoints (proxied through dashboard)
|
// Webhook routes live on the separate webhook server (port 3002,
|
||||||
.route(
|
// see crate::webhooks::server). The M7.2-C tenant-in-URL form is
|
||||||
"/webhook/github/{repo_id}",
|
// `/webhook/{tenant_id}/{platform}/{repo_id}` and the handlers
|
||||||
post(webhooks::github::handle_github_webhook),
|
// expect a (tenant_id, repo_id) path tuple. Anything mounting
|
||||||
)
|
// them here on the API server would mismatch the handler
|
||||||
.route(
|
// signature, so the routes are not exported.
|
||||||
"/webhook/gitlab/{repo_id}",
|
|
||||||
post(webhooks::gitlab::handle_gitlab_webhook),
|
|
||||||
)
|
|
||||||
.route(
|
|
||||||
"/webhook/gitea/{repo_id}",
|
|
||||||
post(webhooks::gitea::handle_gitea_webhook),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user