fix: fmt
This commit is contained in:
parent
ebeba5fe29
commit
e235dc2ecb
1 changed files with 4 additions and 7 deletions
|
|
@ -282,13 +282,10 @@ pub async fn handle_crud(
|
|||
|
||||
let response = match method_str.to_uppercase().as_str() {
|
||||
"GET" => {
|
||||
let rows = q
|
||||
.fetch_all(&state.pool)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tracing::error!("GET {}: {}", table, e);
|
||||
StatusCode::INTERNAL_SERVER_ERROR
|
||||
})?;
|
||||
let rows = q.fetch_all(&state.pool).await.map_err(|e| {
|
||||
tracing::error!("GET {}: {}", table, e);
|
||||
StatusCode::INTERNAL_SERVER_ERROR
|
||||
})?;
|
||||
let mut v = Value::Array(rows.into_iter().map(pg_row_to_json).collect());
|
||||
if table == "users" {
|
||||
v = strip_password_hash(v);
|
||||
|
|
|
|||
Loading…
Reference in a new issue