2023-05-17 17:09:00 +00:00
|
|
|
use askama::Template;
|
2023-05-28 19:20:55 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
2023-05-17 17:09:00 +00:00
|
|
|
|
2023-05-28 19:20:55 +00:00
|
|
|
#[derive(Debug, Default, Template, Deserialize, Serialize)]
|
2023-05-17 20:40:06 +00:00
|
|
|
#[template(path = "signup.html")]
|
2023-05-17 17:09:00 +00:00
|
|
|
pub struct CreateUser {
|
|
|
|
pub username: String,
|
|
|
|
pub displayname: Option<String>,
|
|
|
|
pub email: Option<String>,
|
|
|
|
pub password: String,
|
|
|
|
pub pw_verify: String,
|
|
|
|
}
|
2023-05-28 19:20:55 +00:00
|
|
|
|
|
|
|
#[derive(Debug, Default, Template, Deserialize, Serialize)]
|
|
|
|
#[template(path = "login_post.html")]
|
|
|
|
pub struct LoginPost {
|
|
|
|
pub username: String,
|
|
|
|
pub password: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, Default, Template, Deserialize, Serialize)]
|
|
|
|
#[template(path = "login_get.html")]
|
|
|
|
pub struct LoginGet {
|
|
|
|
pub username: String,
|
|
|
|
pub password: String,
|
|
|
|
}
|