moves db logic inside model's managers

This commit is contained in:
2019-10-13 16:02:47 +02:00
parent 068b2e7169
commit 0df875d6a6
6 changed files with 183 additions and 116 deletions

View File

@@ -35,7 +35,6 @@ where
J: serde::ser::Serialize + Send + 'static,
Q: Fn(DbApi) -> QueryResult<J> + Send + 'static,
{
dbg!("db_call");
let conn = pool.get().unwrap();
web::block(move || {
let api = DbApi::with_conn(&conn);