Initial commit - current CRM state

This commit is contained in:
2026-06-22 15:43:25 +02:00
commit 215d6739d1
19 changed files with 3739 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
use sqlx::postgres::PgPoolOptions;
use sqlx::PgPool;
pub async fn init_db_pool(database_url: &str) -> PgPool {
PgPoolOptions::new()
.max_connections(20)
.connect(database_url)
.await
.expect("Failed to connect to PostgreSQL database")
}
pub async fn verify_connection(pool: &PgPool) -> bool {
sqlx::query_scalar::<_, i32>("SELECT 1")
.fetch_one(pool)
.await
.is_ok()
}