- Changed 302 responses to 200 where needed - Fixed a bug where expiring pastas cause MicroBin to crahs - Fixed a bug where water.css didn't have the correct MIME type - Fixed a bug where missing doctype declaration caused styling issues in Firefox
23 lines
492 B
Rust
23 lines
492 B
Rust
use crate::args::{Args, ARGS};
|
|
use actix_web::{get, HttpResponse};
|
|
use askama::Template;
|
|
use std::marker::PhantomData;
|
|
|
|
#[derive(Template)]
|
|
#[template(path = "help.html")]
|
|
struct Help<'a> {
|
|
args: &'a Args,
|
|
_marker: PhantomData<&'a ()>,
|
|
}
|
|
|
|
#[get("/help")]
|
|
pub async fn help() -> HttpResponse {
|
|
HttpResponse::Ok().content_type("text/html").body(
|
|
Help {
|
|
args: &ARGS,
|
|
_marker: Default::default(),
|
|
}
|
|
.render()
|
|
.unwrap(),
|
|
)
|
|
}
|