forked from gorb/backend
style: cargo clippy and format
This commit is contained in:
parent
5d0d666094
commit
97f7595cc5
10 changed files with 289 additions and 159 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue