diff --git a/backend/src/api/eatery.rs b/backend/src/api/eatery.rs index 8aba59a..1c6b236 100644 --- a/backend/src/api/eatery.rs +++ b/backend/src/api/eatery.rs @@ -69,5 +69,7 @@ fn grab_rows(eatery: String) -> oracle::Result> { cholesterol: row.get(14).unwrap_or(None)}); } + conn.close()?; + Ok(row_vec) } diff --git a/backend/src/api/plan.rs b/backend/src/api/plan.rs index 7ae365f..f494d7c 100644 --- a/backend/src/api/plan.rs +++ b/backend/src/api/plan.rs @@ -55,6 +55,8 @@ fn create_plan(plan: PlanData) -> Result<()> { ("total_cholesterol", &plan.total_cholesterol)])?; info!("Created new plan for user: {}", plan.net_id); + conn.commit()?; + conn.close()?; Ok(()) }