Fix compatibility with SQlite
Also fixes a bug in plume-models
This commit is contained in:
+3
-3
@@ -38,7 +38,7 @@ use diesel::r2d2::ConnectionManager;
|
||||
use rocket::State;
|
||||
use rocket_contrib::Template;
|
||||
use rocket_csrf::CsrfFairingBuilder;
|
||||
use plume_models::{DB_URL, Connection, db_conn::PgPool};
|
||||
use plume_models::{DB_URL, Connection, db_conn::DbPool};
|
||||
use workerpool::{Pool, thunk::ThunkWorker};
|
||||
|
||||
mod api;
|
||||
@@ -48,11 +48,11 @@ mod routes;
|
||||
type Worker<'a> = State<'a, Pool<ThunkWorker<()>>>;
|
||||
|
||||
/// Initializes a database pool.
|
||||
fn init_pool() -> Option<PgPool> {
|
||||
fn init_pool() -> Option<DbPool> {
|
||||
dotenv::dotenv().ok();
|
||||
|
||||
let manager = ConnectionManager::<Connection>::new(DB_URL.as_str());
|
||||
PgPool::new(manager).ok()
|
||||
DbPool::new(manager).ok()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
Reference in New Issue
Block a user