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)