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

13 lines
309 B
Rust
Raw Normal View History

2020-05-27 20:51:28 +02:00
use actix_web::{get, web, HttpResponse};
2020-05-16 22:37:02 -07:00
use handlebars::*;
#[get("modeditor")]
pub async fn mod_editor_get(hb: web::Data<Handlebars<'_>>) -> HttpResponse {
let data = json!({
"name": "Handlebars"
});
2020-05-31 22:20:16 -07:00
let body = hb.render("mod-page", &data).unwrap();
2020-05-16 22:37:02 -07:00
HttpResponse::Ok().body(body)
2020-05-27 20:51:28 +02:00
}