tenebrous-sheets/src/catchers.rs

15 lines
361 B
Rust

use rocket::request::Request;
use rocket_contrib::templates::Template;
use std::collections::HashMap;
pub fn catchers() -> Vec<rocket::Catcher> {
catchers![forbidden]
}
#[catch(403)]
fn forbidden(_: &Request) -> Template {
let mut context = HashMap::new();
context.insert("message", "homie aint allowed");
Template::render("error", context)
}