feat: Bunny CDN integration for images #17

Merged
radical merged 10 commits from wip/images into main 2025-05-23 23:06:21 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 4124b08bb2 - Show all commits

View file

@ -42,7 +42,7 @@ pub async fn res(
return Ok(error); 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 { if let Err(error) = accounts {
return Ok(error); return Ok(error);

View file

@ -837,7 +837,7 @@ impl User {
Ok(user.build()) Ok(user.build())
} }
pub async fn fetch_all(pool: &Pool<Postgres>, start: i32, amount: i32) -> Result<Vec<Self>, HttpResponse> { pub async fn fetch_amount(pool: &Pool<Postgres>, start: i32, amount: i32) -> Result<Vec<Self>, 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") 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(amount)
.bind(start) .bind(start)