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() {
"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);