Private
Public Access
1
0

fix: update axum route syntax to v0.8 standard
All checks were successful
CI Pipeline / Rust Format Check (push) Successful in 4s
CI Pipeline / Clippy Lints (push) Successful in 53s
CI Pipeline / Rust Unit Tests (push) Successful in 1m13s
CI Pipeline / Security Audit (push) Successful in 4s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 14s
CI Pipeline / Build .deb & Release (push) Has been skipped

This commit is contained in:
2026-05-16 17:39:21 +00:00
parent da3dffd81f
commit f9bdc0a5af
3 changed files with 12 additions and 12 deletions

View File

@ -29,7 +29,7 @@ pub struct HostConflict {
pub fn router() -> Router<AppState> {
Router::new()
.route("/enroll", post(enroll_host))
.route("/enroll/status/:token", get(enroll_status))
.route("/enroll/status/{token}", get(enroll_status))
}
/// POST /api/v1/enroll
@ -98,7 +98,7 @@ async fn enroll_host(
.into_response())
}
/// GET /api/v1/enroll/status/:token
/// GET /api/v1/enroll/status/{token}
/// Returns status of enrollment (pending/approved/denied/not_found).
async fn enroll_status(
State(state): State<AppState>,
@ -141,8 +141,8 @@ async fn enroll_status(
pub fn admin_router() -> Router<AppState> {
Router::new()
.route("/enrollments", get(list_admin_enrollments))
.route("/enrollments/:id/approve", post(approve_enrollment))
.route("/enrollments/:id/deny", delete(deny_enrollment))
.route("/enrollments/{id}/approve", post(approve_enrollment))
.route("/enrollments/{id}/deny", delete(deny_enrollment))
}
/// GET /api/v1/admin/enrollments