feat: Bunny CDN integration for images #17
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue