summaryrefslogtreecommitdiff
path: root/src/database/user.rs
diff options
context:
space:
mode:
authorniliara-edu <nil.jimeno@estudiant.fjaverianas.com>2025-01-26 19:11:24 +0100
committerniliara-edu <nil.jimeno@estudiant.fjaverianas.com>2025-01-26 19:11:24 +0100
commitc622eab39ac7dd9f794b5d60eb937e29c9b3bd6e (patch)
treea75067a661250a4ed74096929083948f65c01fdb /src/database/user.rs
parent5891af7e8c1411029fe1ad9c6d3182f88bcf3dfd (diff)
add api documentation
Diffstat (limited to 'src/database/user.rs')
-rw-r--r--src/database/user.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/database/user.rs b/src/database/user.rs
index ff7b1ab..d3202ce 100644
--- a/src/database/user.rs
+++ b/src/database/user.rs
@@ -1,6 +1,7 @@
use crate::database::DatabaseWrapper;
use serde::{Deserialize, Serialize};
use sqlx::mysql::MySqlQueryResult;
+use utoipa::ToSchema;
#[derive(Deserialize, Serialize)]
pub struct User {
@@ -9,9 +10,11 @@ pub struct User {
password: Option<String>,
}
-#[derive(Deserialize, Serialize)]
+#[derive(Deserialize, Serialize, ToSchema)]
pub struct UserForm {
+ #[schema(example = "username")]
name: Option<String>,
+ #[schema(example = "password")]
password: Option<String>,
}