From 35d22c77a2276adefe8bf0197e6a599b59cf79c9 Mon Sep 17 00:00:00 2001 From: mbecker20 Date: Sun, 12 Oct 2025 12:55:14 -0700 Subject: [PATCH] Core add non authed /version route --- bin/core/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/core/src/main.rs b/bin/core/src/main.rs index 450ed0776..fd5ed6cda 100644 --- a/bin/core/src/main.rs +++ b/bin/core/src/main.rs @@ -6,7 +6,7 @@ extern crate tracing; use std::{net::SocketAddr, str::FromStr}; use anyhow::Context; -use axum::Router; +use axum::{Router, routing::get}; use axum_server::{Handle, tls_rustls::RustlsConfig}; use tower_http::{ cors::{Any, CorsLayer}, @@ -90,6 +90,7 @@ async fn app() -> anyhow::Result<()> { .not_found_service(frontend_index.clone()); let app = Router::new() + .route("/version", get(|| async { env!("CARGO_PKG_VERSION") })) .nest("/auth", api::auth::router()) .nest("/user", api::user::router()) .nest("/read", api::read::router())