aboutsummaryrefslogtreecommitdiff
path: root/src/routers/account.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/routers/account.rs')
-rw-r--r--src/routers/account.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/routers/account.rs b/src/routers/account.rs
index 71ba496..1ae8c22 100644
--- a/src/routers/account.rs
+++ b/src/routers/account.rs
@@ -34,7 +34,7 @@ struct Token {
34} 34}
35 35
36#[derive(Deserialize, ToSchema)] 36#[derive(Deserialize, ToSchema)]
37#[schema(description = "Account register data")] 37#[schema(description = "Body of the account registration request")]
38struct RegisterRequest { 38struct RegisterRequest {
39 #[schema(examples("john_doe", "ivanov_ivan"))] 39 #[schema(examples("john_doe", "ivanov_ivan"))]
40 username: String, 40 username: String,
@@ -57,7 +57,7 @@ enum TokenLifetime {
57} 57}
58 58
59#[derive(Deserialize, ToSchema)] 59#[derive(Deserialize, ToSchema)]
60#[schema(description = "Account login data")] 60#[schema(description = "Body of the login request")]
61struct LoginRequest { 61struct LoginRequest {
62 #[schema(examples("john_doe", "ivanov_ivan"))] 62 #[schema(examples("john_doe", "ivanov_ivan"))]
63 username: String, 63 username: String,
@@ -69,7 +69,7 @@ struct LoginRequest {
69} 69}
70 70
71#[derive(Deserialize, ToSchema)] 71#[derive(Deserialize, ToSchema)]
72#[schema(description = "Change account password data")] 72#[schema(description = "Body of the change account password request")]
73struct ChangePasswordRequest { 73struct ChangePasswordRequest {
74 #[schema(examples("secret-password"))] 74 #[schema(examples("secret-password"))]
75 old_password: String, 75 old_password: String,
@@ -78,14 +78,14 @@ struct ChangePasswordRequest {
78} 78}
79 79
80#[derive(Deserialize, ToSchema)] 80#[derive(Deserialize, ToSchema)]
81#[schema(description = "Change account password data")] 81#[schema(description = "Body of the change account username request")]
82struct ChangeUsernameRequest { 82struct ChangeUsernameRequest {
83 #[schema(examples("ivanov_ivan", "john_doe"))] 83 #[schema(examples("ivanov_ivan", "john_doe"))]
84 new_username: String, 84 new_username: String,
85} 85}
86 86
87#[derive(Deserialize, ToSchema)] 87#[derive(Deserialize, ToSchema)]
88#[schema(description = "Change account name data")] 88#[schema(description = "Body of the change account name request")]
89struct ChangeNameRequest { 89struct ChangeNameRequest {
90 #[schema(examples("John", "Иван"))] 90 #[schema(examples("John", "Иван"))]
91 first_name: Option<String>, 91 first_name: Option<String>,
@@ -94,7 +94,7 @@ struct ChangeNameRequest {
94} 94}
95 95
96#[derive(Deserialize, ToSchema)] 96#[derive(Deserialize, ToSchema)]
97#[schema(description = "Account delete data")] 97#[schema(description = "Body of the delete account request")]
98struct DeleteUserRequest { 98struct DeleteUserRequest {
99 #[schema(examples("secret-password"))] 99 #[schema(examples("secret-password"))]
100 password: String, 100 password: String,
@@ -129,7 +129,7 @@ async fn me(Auth(user): Auth) -> ApiResult<Account> {
129 responses( 129 responses(
130 ( 130 (
131 status = 200, body = SuccessResponse<Account>, 131 status = 200, body = SuccessResponse<Account>,
132 description = "Success response with created account data" 132 description = "Success response with your account data"
133 ), 133 ),
134 GlobalResponses 134 GlobalResponses
135 ), 135 ),
@@ -213,7 +213,7 @@ async fn login(
213 responses( 213 responses(
214 ( 214 (
215 status = 200, body = SuccessResponse<Account>, 215 status = 200, body = SuccessResponse<Account>,
216 description = "Success response with changed account data" 216 description = "Success response with the updated account data"
217 ), 217 ),
218 GlobalResponses 218 GlobalResponses
219 ), 219 ),
@@ -246,7 +246,7 @@ async fn change_password(
246 responses( 246 responses(
247 ( 247 (
248 status = 200, body = SuccessResponse<Account>, 248 status = 200, body = SuccessResponse<Account>,
249 description = "Success response with changed account data" 249 description = "Success response with the updated account data"
250 ), 250 ),
251 GlobalResponses 251 GlobalResponses
252 ), 252 ),
@@ -281,7 +281,7 @@ async fn change_username(
281 responses( 281 responses(
282 ( 282 (
283 status = 200, body = SuccessResponse<Account>, 283 status = 200, body = SuccessResponse<Account>,
284 description = "Success response with changed account data" 284 description = "Success response with the updated account data"
285 ), 285 ),
286 GlobalResponses 286 GlobalResponses
287 ), 287 ),
@@ -315,7 +315,7 @@ async fn change_name(
315 responses( 315 responses(
316 ( 316 (
317 status = 200, body = SuccessResponse<Account>, 317 status = 200, body = SuccessResponse<Account>,
318 description = "Success response with deleted account data" 318 description = "Success response with the deleted account data"
319 ), 319 ),
320 GlobalResponses 320 GlobalResponses
321 ), 321 ),