Files
Modrinth-plus/src/routes/index.rs

15 lines
356 B
Rust
Raw Normal View History

use actix_web::{get, HttpResponse};
use serde_json::json;
2020-05-14 22:53:22 -07:00
#[get("/")]
pub async fn index_get() -> HttpResponse {
2020-05-14 22:53:22 -07:00
let data = json!({
"name": "modrinth-labrinth",
"version": env!("CARGO_PKG_VERSION"),
"documentation": "https://docs.modrinth.com",
"about": "Welcome traveler!"
2020-05-14 22:53:22 -07:00
});
HttpResponse::Ok().json(data)
}