env: test

This commit is contained in:
silver 2023-07-30 06:01:42 +01:00
parent 43438a369b
commit 3415792d7f

View file

@ -38,6 +38,7 @@ pub struct Accounts {
pub async fn db_init(config: &Config) -> Result<Pool<Sqlite>, Error> {
let database = format!("{}/{}", &config.home, &config.database);
println!("Database: {}", database);
let pool = SqlitePoolOptions::new()
.max_connections(5)
.connect_with(SqliteConnectOptions::from_str(&format!("sqlite://{}", database))?.create_if_missing(true))
@ -172,6 +173,7 @@ pub fn get_config() -> Config {
config.mail_pass = x.trim().to_string();
}
println!("{:?}", config);
config
}