summaryrefslogtreecommitdiff
path: root/dichroism/src/handlers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dichroism/src/handlers.rs')
-rw-r--r--dichroism/src/handlers.rs4
1 files changed, 2 insertions, 2 deletions
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<DbPool>) -> Result<HttpResponse, Error> {
let conn = pool.get().expect("Couldn't get DB connection from pool.");
- let products: Vec<Product> = web::block(move || product_repo::read_products(&conn))
+ let products: Vec<Product> = web::block(move || repo::read_products(&conn))
.await
.map_err(|e| {
eprintln!("{}", e);