From 4124b08bb2232a60e38d059624da3f741701d2ac Mon Sep 17 00:00:00 2001 From: Radical Date: Tue, 20 May 2025 22:20:32 +0200 Subject: [PATCH] style: change function name --- src/api/v1/users/mod.rs | 2 +- src/structs.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/v1/users/mod.rs b/src/api/v1/users/mod.rs index f79bb5a..de9aec0 100644 --- a/src/api/v1/users/mod.rs +++ b/src/api/v1/users/mod.rs @@ -42,7 +42,7 @@ pub async fn res( return Ok(error); } - let accounts = User::fetch_all(&data.pool, start, amount).await; + let accounts = User::fetch_amount(&data.pool, start, amount).await; if let Err(error) = accounts { return Ok(error); diff --git a/src/structs.rs b/src/structs.rs index 26bd89d..a6e1587 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -837,7 +837,7 @@ impl User { Ok(user.build()) } - pub async fn fetch_all(pool: &Pool, start: i32, amount: i32) -> Result, HttpResponse> { + pub async fn fetch_amount(pool: &Pool, start: i32, amount: i32) -> Result, HttpResponse> { let row = sqlx::query_as("SELECT CAST(uuid AS VARCHAR), username, display_name, avatar, email FROM users ORDER BY username LIMIT $1 OFFSET $2") .bind(amount) .bind(start)