based/src/htmx.rs
2025-01-16 18:22:52 +01:00

11 lines
301 B
Rust

use crate::request::assets::DataResponse;
use rocket::get;
#[get("/assets/htmx.min.js")]
pub fn htmx_script_route() -> DataResponse {
DataResponse::new(
include_str!("htmx.min.js").as_bytes().to_vec(),
"application/javascript".to_string(),
Some(60 * 60 * 24 * 3),
)
}