use askama::Template; use serde::{Deserialize, Serialize}; use crate::User; #[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq)] #[template(path = "signup.html")] pub struct CreateUser { pub username: String, pub displayname: Option, pub email: Option, pub password: String, pub pw_verify: String, } #[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq)] #[template(path = "login_post.html")] pub struct LoginPost { pub username: String, pub password: String, } #[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq)] #[template(path = "login_get.html")] pub struct LoginGet { pub username: String, pub password: String, } #[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq)] #[template(path = "logout_get.html")] pub struct LogoutGet; #[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq)] #[template(path = "logout_post.html")] pub struct LogoutPost; #[derive(Debug, Default, Template, Deserialize, Serialize, PartialEq, Eq)] #[template(path = "index.html")] pub struct Index { pub user: Option, }