summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2023-12-12 18:20:56 +0000
committerLibravatar cel 🌸 <cel@blos.sm>2023-12-12 18:20:56 +0000
commita587459a1817c0fc57b46df3f9c69567e1e775b7 (patch)
treeab99c6aaa7c2b3245c83db6332e4ca54006831b3 /src/lib.rs
parent370a25e5a0cbb95e2aa1cec55305b22aeaf99aa0 (diff)
downloadpinussy-a587459a1817c0fc57b46df3f9c69567e1e775b7.tar.gz
pinussy-a587459a1817c0fc57b46df3f9c69567e1e775b7.tar.bz2
pinussy-a587459a1817c0fc57b46df3f9c69567e1e775b7.zip
refactor: separate model and controller
Diffstat (limited to '')
-rw-r--r--src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 591d0c6..2105040 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,18 +1,17 @@
#[macro_use]
mod actix_ructe;
+pub mod db;
mod error;
mod notification;
pub mod routes;
mod users;
-use sqlx::{Pool, Postgres};
-
type Result<T> = std::result::Result<T, crate::error::PinussyError>;
#[derive(Clone)]
pub struct Pinussy {
- pub db: Pool<Postgres>,
+ pub db: db::Database,
}
#[derive(sqlx::Type)]