From 00c71f6baff136a88805ca2e3f9ef72453ac9f35 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Fri, 23 Oct 2020 08:10:13 -0400 Subject: moved entities under repo; photos now hold onto just the filename --- dichroism/src/handlers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dichroism/src/handlers.rs') diff --git a/dichroism/src/handlers.rs b/dichroism/src/handlers.rs index 23d2039..b4b117c 100644 --- a/dichroism/src/handlers.rs +++ b/dichroism/src/handlers.rs @@ -1,5 +1,5 @@ use crate::dtos::*; -use crate::product_repo; +use crate::repo; use crate::types::DbPool; use actix_web::{get, patch, post, web, Error, HttpResponse, Responder}; @@ -11,7 +11,7 @@ async fn hello() -> impl Responder { #[get("/products")] async fn get_products(pool: web::Data) -> Result { let conn = pool.get().expect("Couldn't get DB connection from pool."); - let products: Vec = web::block(move || product_repo::read_products(&conn)) + let products: Vec = web::block(move || repo::read_products(&conn)) .await .map_err(|e| { eprintln!("{}", e); -- cgit v1.2.3