You've already forked AstralRinth
* Distributed rate limit, fix search panic, add migration task * Add binary info to root endpoint
21 lines
549 B
Rust
21 lines
549 B
Rust
use actix_web::{get, HttpResponse};
|
|
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": env!("GIT_HASH", "unknown"),
|
|
"profile": env!("COMPILATION_PROFILE"),
|
|
}
|
|
});
|
|
|
|
HttpResponse::Ok().json(data)
|
|
}
|