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() {
|
let response = match method_str.to_uppercase().as_str() {
|
||||||
"GET" => {
|
"GET" => {
|
||||||
let rows = q
|
let rows = q.fetch_all(&state.pool).await.map_err(|e| {
|
||||||
.fetch_all(&state.pool)
|
tracing::error!("GET {}: {}", table, e);
|
||||||
.await
|
StatusCode::INTERNAL_SERVER_ERROR
|
||||||
.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());
|
let mut v = Value::Array(rows.into_iter().map(pg_row_to_json).collect());
|
||||||
if table == "users" {
|
if table == "users" {
|
||||||
v = strip_password_hash(v);
|
v = strip_password_hash(v);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue