A cloudflare backed DDNS service written in Rust
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
455 B

use actix_web::{HttpRequest, Json, Result};
use crate::server::router::AppState;
use crate::VERSION;
pub mod api;
pub mod error;
pub mod middleware;
pub mod router;
pub mod util;
#[derive(Serialize)]
pub struct Health {
version: &'static str,
}
pub fn index(_req: &HttpRequest<AppState>) -> &'static str {
"Hello, World!"
}
pub fn healthcheck(_req: HttpRequest<AppState>) -> Result<Json<Health>> {
Ok(Json(Health { version: VERSION }))
}