summaryrefslogtreecommitdiff
path: root/dichroism/src/handlers.rs
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-10-23 08:10:13 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-10-23 08:10:13 -0400
commit00c71f6baff136a88805ca2e3f9ef72453ac9f35 (patch)
tree49db87097f949edce1f6639ba4118cff852e3937 /dichroism/src/handlers.rs
parent5cb0869b94fc8b9aff564055af9a60046de7b028 (diff)
downloadtheglassyladies-00c71f6baff136a88805ca2e3f9ef72453ac9f35.tar.xz
theglassyladies-00c71f6baff136a88805ca2e3f9ef72453ac9f35.zip
moved entities under repo; photos now hold onto just the filename
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);