1
0
Fork 0
forked from gorb/backend

style: cargo clippy and format

This commit is contained in:
Radical 2025-05-02 15:20:22 +02:00
parent 5d0d666094
commit 97f7595cc5
10 changed files with 289 additions and 159 deletions

View file

@ -18,10 +18,13 @@ struct Response {
#[get("/stats")]
pub async fn res(data: web::Data<Data>) -> impl Responder {
let accounts;
if let Ok(users) = sqlx::query("SELECT uuid FROM users").fetch_all(&data.pool).await {
if let Ok(users) = sqlx::query("SELECT uuid FROM users")
.fetch_all(&data.pool)
.await
{
accounts = users.len();
} else {
return HttpResponse::InternalServerError().finish()
return HttpResponse::InternalServerError().finish();
}
let response = Response {