aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTolmachev Igor <me@igorek.dev>2025-09-25 15:54:04 +0300
committerTolmachev Igor <me@igorek.dev>2025-09-25 15:54:04 +0300
commit2bccd70a3f70b13f10a687aea234fdc43ef12a0c (patch)
tree1c8877571a09116bb38b6cc9b30466c52186fb96
parent5df718af71cc861f7b7ced5635a38ed9e76cb0f1 (diff)
downloadqueue_server-2bccd70a3f70b13f10a687aea234fdc43ef12a0c.tar.gz
queue_server-2bccd70a3f70b13f10a687aea234fdc43ef12a0c.zip
Rename /change methods to /update
-rw-r--r--src/routers/account.rs18
-rw-r--r--src/routers/queue/manage.rs12
2 files changed, 15 insertions, 15 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)]
222async fn change_password( 222async 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)]
255async fn change_username( 255async 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)]
290async fn change_name( 290async 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}
diff --git a/src/routers/queue/manage.rs b/src/routers/queue/manage.rs
index f174bd5..f6587d1 100644
--- a/src/routers/queue/manage.rs
+++ b/src/routers/queue/manage.rs
@@ -130,7 +130,7 @@ async fn create(
130 130
131#[utoipa::path( 131#[utoipa::path(
132 put, 132 put,
133 path = "/change/name", 133 path = "/update/name",
134 tag = QUEUE, 134 tag = QUEUE,
135 summary = "Change name", 135 summary = "Change name",
136 description = "Change queue name", 136 description = "Change queue name",
@@ -144,7 +144,7 @@ async fn create(
144 ), 144 ),
145 security(("auth" = [])), 145 security(("auth" = [])),
146)] 146)]
147async fn change_name( 147async fn update_name(
148 State(state): State<AppState>, 148 State(state): State<AppState>,
149 Auth(user): Auth, 149 Auth(user): Auth,
150 ApiJson(req): ApiJson<ChangeQueueNameRequest>, 150 ApiJson(req): ApiJson<ChangeQueueNameRequest>,
@@ -161,7 +161,7 @@ async fn change_name(
161 161
162#[utoipa::path( 162#[utoipa::path(
163 put, 163 put,
164 path = "/change/owner", 164 path = "/update/owner",
165 tag = QUEUE, 165 tag = QUEUE,
166 summary = "Change owner", 166 summary = "Change owner",
167 description = "Reassign queue ownership", 167 description = "Reassign queue ownership",
@@ -175,7 +175,7 @@ async fn change_name(
175 ), 175 ),
176 security(("auth" = [])), 176 security(("auth" = [])),
177)] 177)]
178async fn change_owner( 178async fn update_owner(
179 State(state): State<AppState>, 179 State(state): State<AppState>,
180 Auth(user): Auth, 180 Auth(user): Auth,
181 ApiJson(req): ApiJson<ChangeQueueOwnershipRequest>, 181 ApiJson(req): ApiJson<ChangeQueueOwnershipRequest>,
@@ -227,7 +227,7 @@ pub fn router() -> OpenApiRouter<AppState> {
227 OpenApiRouter::new() 227 OpenApiRouter::new()
228 .routes(routes!(owned)) 228 .routes(routes!(owned))
229 .routes(routes!(create)) 229 .routes(routes!(create))
230 .routes(routes!(change_name)) 230 .routes(routes!(update_name))
231 .routes(routes!(change_owner)) 231 .routes(routes!(update_owner))
232 .routes(routes!(delete)) 232 .routes(routes!(delete))
233} 233}