Separated the code

This commit is contained in:
phoenix
2025-03-31 19:16:15 -04:00
parent dda88ce0a0
commit 9b77a8dd78
7 changed files with 57 additions and 26 deletions
+12
View File
@@ -0,0 +1,12 @@
use axum::{Json, http::StatusCode};
use crate::models;
pub async fn register_user(
Json(payload): Json<models::common::CreateUser>,
) -> (StatusCode, Json<models::common::User>) {
let user = models::common::User {
username: payload.username.clone(),
};
(StatusCode::CREATED, Json(user))
}