diff options
| author | Tolmachev Igor <me@igorek.dev> | 2025-09-25 15:54:04 +0300 |
|---|---|---|
| committer | Tolmachev Igor <me@igorek.dev> | 2025-09-25 15:54:04 +0300 |
| commit | 2bccd70a3f70b13f10a687aea234fdc43ef12a0c (patch) | |
| tree | 1c8877571a09116bb38b6cc9b30466c52186fb96 /src/routers/account.rs | |
| parent | 5df718af71cc861f7b7ced5635a38ed9e76cb0f1 (diff) | |
| download | queue_server-2bccd70a3f70b13f10a687aea234fdc43ef12a0c.tar.gz queue_server-2bccd70a3f70b13f10a687aea234fdc43ef12a0c.zip | |
Rename /change methods to /update
Diffstat (limited to 'src/routers/account.rs')
| -rw-r--r-- | src/routers/account.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/routers/account.rs b/src/routers/account.rs index 1ae8c22..3159db6 100644 --- a/src/routers/account.rs +++ b/src/routers/account.rs | |||
| @@ -205,7 +205,7 @@ async fn login( | |||
| 205 | 205 | ||
| 206 | #[utoipa::path( | 206 | #[utoipa::path( |
| 207 | put, | 207 | put, |
| 208 | path = "/change/password", | 208 | path = "/update/password", |
| 209 | tag = ACCOUNT, | 209 | tag = ACCOUNT, |
| 210 | summary = "Change password", | 210 | summary = "Change password", |
| 211 | description = "Change your account password", | 211 | description = "Change your account password", |
| @@ -219,7 +219,7 @@ async fn login( | |||
| 219 | ), | 219 | ), |
| 220 | security(("auth" = [])) | 220 | security(("auth" = [])) |
| 221 | )] | 221 | )] |
| 222 | async fn change_password( | 222 | async fn update_password( |
| 223 | State(state): State<AppState>, | 223 | State(state): State<AppState>, |
| 224 | Auth(user): Auth, | 224 | Auth(user): Auth, |
| 225 | ApiJson(req): ApiJson<ChangePasswordRequest>, | 225 | ApiJson(req): ApiJson<ChangePasswordRequest>, |
| @@ -238,7 +238,7 @@ async fn change_password( | |||
| 238 | 238 | ||
| 239 | #[utoipa::path( | 239 | #[utoipa::path( |
| 240 | put, | 240 | put, |
| 241 | path = "/change/username", | 241 | path = "/update/username", |
| 242 | tag = ACCOUNT, | 242 | tag = ACCOUNT, |
| 243 | summary = "Change username", | 243 | summary = "Change username", |
| 244 | description = "Change your account username", | 244 | description = "Change your account username", |
| @@ -252,7 +252,7 @@ async fn change_password( | |||
| 252 | ), | 252 | ), |
| 253 | security(("auth" = [])) | 253 | security(("auth" = [])) |
| 254 | )] | 254 | )] |
| 255 | async fn change_username( | 255 | async fn update_username( |
| 256 | State(state): State<AppState>, | 256 | State(state): State<AppState>, |
| 257 | Auth(user): Auth, | 257 | Auth(user): Auth, |
| 258 | ApiJson(req): ApiJson<ChangeUsernameRequest>, | 258 | ApiJson(req): ApiJson<ChangeUsernameRequest>, |
| @@ -273,7 +273,7 @@ async fn change_username( | |||
| 273 | 273 | ||
| 274 | #[utoipa::path( | 274 | #[utoipa::path( |
| 275 | put, | 275 | put, |
| 276 | path = "/change/name", | 276 | path = "/update/name", |
| 277 | tag = ACCOUNT, | 277 | tag = ACCOUNT, |
| 278 | summary = "Change name", | 278 | summary = "Change name", |
| 279 | description = "Change your account first or last name", | 279 | description = "Change your account first or last name", |
| @@ -287,7 +287,7 @@ async fn change_username( | |||
| 287 | ), | 287 | ), |
| 288 | security(("auth" = [])) | 288 | security(("auth" = [])) |
| 289 | )] | 289 | )] |
| 290 | async fn change_name( | 290 | async fn update_name( |
| 291 | State(state): State<AppState>, | 291 | State(state): State<AppState>, |
| 292 | Auth(user): Auth, | 292 | Auth(user): Auth, |
| 293 | ApiJson(req): ApiJson<ChangeNameRequest>, | 293 | ApiJson(req): ApiJson<ChangeNameRequest>, |
| @@ -340,8 +340,8 @@ pub fn router() -> OpenApiRouter<AppState> { | |||
| 340 | .routes(routes!(me)) | 340 | .routes(routes!(me)) |
| 341 | .routes(routes!(register)) | 341 | .routes(routes!(register)) |
| 342 | .routes(routes!(login)) | 342 | .routes(routes!(login)) |
| 343 | .routes(routes!(change_password)) | 343 | .routes(routes!(update_password)) |
| 344 | .routes(routes!(change_username)) | 344 | .routes(routes!(update_username)) |
| 345 | .routes(routes!(change_name)) | 345 | .routes(routes!(update_name)) |
| 346 | .routes(routes!(delete)) | 346 | .routes(routes!(delete)) |
| 347 | } | 347 | } |
