Files
AstralRinth/apps/labrinth/src/routes/index.rs
Alejandro González 6f59f4c110 fix: tag Labrinth and Daedalus Docker builds with the right metadata (#4147)
* fix: tag Labrinth and Daedalus Docker builds with the right metadata

* chore: make it clear that Labrinth license is AGPL-3.0-only
2025-08-16 15:47:11 +00:00

21 lines
565 B
Rust

use actix_web::{HttpResponse, get};
use serde_json::json;
#[get("/")]
pub async fn index_get() -> HttpResponse {
let data = json!({
"name": "modrinth-labrinth",
"version": env!("CARGO_PKG_VERSION"),
"documentation": "https://docs.modrinth.com",
"about": "Welcome traveler!",
"build_info": {
"comp_date": env!("COMPILATION_DATE"),
"git_hash": option_env!("GIT_HASH").unwrap_or("unknown"),
"profile": env!("COMPILATION_PROFILE"),
}
});
HttpResponse::Ok().json(data)
}