This commit is contained in:
Matthew McPeak 2026-06-17 21:45:33 -04:00
parent ebeba5fe29
commit e235dc2ecb
Signed by: McPeakML
GPG key ID: 3D64A2E70F58D07C

View file

@ -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);