Compare commits
2 Commits
main
...
test/doten
Author | SHA1 | Date | |
---|---|---|---|
|
6c73f993d0 | ||
|
777cbaa69d |
@ -25,7 +25,7 @@ fn main() {
|
|||||||
.subcommand(users::command());
|
.subcommand(users::command());
|
||||||
let matches = app.clone().get_matches();
|
let matches = app.clone().get_matches();
|
||||||
|
|
||||||
dotenv::dotenv().ok();
|
dotenv::dotenv().expect("error while reading .env");
|
||||||
let conn = Conn::establish(CONFIG.database_url.as_str());
|
let conn = Conn::establish(CONFIG.database_url.as_str());
|
||||||
let _ = conn.as_ref().map(|conn| Instance::cache_local(conn));
|
let _ = conn.as_ref().map(|conn| Instance::cache_local(conn));
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ compile_i18n!();
|
|||||||
|
|
||||||
/// Initializes a database pool.
|
/// Initializes a database pool.
|
||||||
fn init_pool() -> Option<DbPool> {
|
fn init_pool() -> Option<DbPool> {
|
||||||
dotenv::dotenv().ok();
|
dotenv::dotenv().unwrap();
|
||||||
|
|
||||||
let manager = ConnectionManager::<Connection>::new(CONFIG.database_url.as_str());
|
let manager = ConnectionManager::<Connection>::new(CONFIG.database_url.as_str());
|
||||||
let pool = DbPool::builder()
|
let pool = DbPool::builder()
|
||||||
|
Loading…
Reference in New Issue
Block a user