add: user account warnings

This commit is contained in:
trisua 2025-04-11 22:12:43 -04:00
parent 535a854a47
commit 5995aaf31c
16 changed files with 459 additions and 1 deletions

View file

@ -162,6 +162,12 @@ pub fn routes() -> Router {
"/auth/user/find_by_ip/{ip}",
get(auth::profile::redirect_from_ip),
)
// warnings
.route("/warnings/{id}", post(auth::user_warnings::create_request))
.route(
"/warnings/{id}",
delete(auth::user_warnings::delete_request),
)
// notifications
.route(
"/notifications/my",
@ -326,3 +332,8 @@ pub struct CreateIpBan {
pub struct DisableTotp {
pub totp: String,
}
#[derive(Deserialize)]
pub struct CreateUserWarning {
pub content: String,
}