This commit is contained in:
2026-07-29 17:41:52 +02:00
parent 98050bb770
commit 6cb9acf98b
38 changed files with 55 additions and 52 deletions
-14
View File
@@ -1,14 +0,0 @@
use serde::Deserialize;
use utoipa::ToSchema;
use validator::Validate;
#[derive(Deserialize, Validate, ToSchema)]
pub struct JoinRequest {
#[validate(length(min = 3, message = "Username must be at least 3 characters long"))]
pub username: String,
#[validate(length(min = 8, message = "Password must be at least 8 characters long"))]
pub password: String,
#[validate(must_match(other = "password", message = "Passwords do not match"))]
pub password_valid: String,
pub superuser_token: Option<String>,
}
+1 -1
View File
@@ -1,7 +1,7 @@
use crate::core::AppState;
use crate::http::error::HTTPError;
use crate::http::validation::ValidatedJson;
use crate::routes::core::dto::JoinRequest;
use crate::domain::dto::core::JoinRequest;
use crate::routes::core::mapper::join_request_to_user_am;
use axum::extract::State;
use axum::http::StatusCode;
+1 -1
View File
@@ -1,6 +1,6 @@
use crate::auth::password::hash_password;
use crate::models::user;
use crate::routes::core::dto::JoinRequest;
use crate::domain::dto::core::JoinRequest;
use anyhow::Result as AnyResult;
use sea_orm::Set;
use uuid::Uuid;
-1
View File
@@ -1,5 +1,4 @@
pub mod domain;
pub mod dto;
pub mod handlers;
pub mod mapper;
pub mod routes;