Skip to content

Commit

Permalink
feat: add /api/webhook enpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
eatradish committed Jul 6, 2024
1 parent b42c5e2 commit 548028f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ use opentelemetry_sdk::Resource;
use server::bot::{answer, Command};
use server::recycler::recycler_worker;
use server::routes::{
dashboard_status, job_info, job_list, job_restart, ping, pipeline_info, pipeline_list,
pipeline_new_pr, worker_info, worker_job_update, worker_list, worker_poll, ws_viewer_handler,
ws_worker_handler, AppState, WSStateMap,
dashboard_status, job_info, job_list, job_restart, ping, pipeline_info, pipeline_list, pipeline_new_pr, webhook_handler, worker_info, worker_job_update, worker_list, worker_poll, ws_viewer_handler, ws_worker_handler, AppState, WSStateMap
};
use server::routes::{pipeline_new, worker_heartbeat};
use server::routes::{pipeline_status, worker_status};
Expand Down Expand Up @@ -121,6 +119,7 @@ async fn main() -> anyhow::Result<()> {
.route("/api/dashboard/status", get(dashboard_status))
.route("/api/ws/viewer/:hostname", get(ws_viewer_handler))
.route("/api/ws/worker/:hostname", get(ws_worker_handler))
.route("/api/webhook", post(webhook_handler))
.nest_service("/assets", ServeDir::new("frontend/dist/assets"))
.route_service("/favicon.ico", ServeFile::new("frontend/dist/favicon.ico"))
.fallback_service(ServeFile::new("frontend/dist/index.html"))
Expand Down

0 comments on commit 548028f

Please sign in to comment.