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.

16 lines
312 B

  1. use actix_web::{HttpRequest, Json, Result};
  2. use VERSION;
  3. #[derive(Serialize)]
  4. pub struct Health {
  5. version: &'static str,
  6. }
  7. pub fn index(_req: &HttpRequest) -> &'static str {
  8. "Hello, World!"
  9. }
  10. pub fn healthcheck(_req: HttpRequest) -> Result<Json<Health>> {
  11. Ok(Json(Health { version: VERSION }))
  12. }