mirror of
https://github.com/flibusta-apps/users_settings_server.git
synced 2025-12-06 14:45:38 +01:00
Fix
This commit is contained in:
@@ -2,7 +2,7 @@ use crate::config::CONFIG;
|
||||
|
||||
use sqlx::{postgres::PgPoolOptions, PgPool};
|
||||
|
||||
pub async fn get_prisma_client() -> PgPool {
|
||||
pub async fn get_postgres_pool() -> PgPool {
|
||||
let database_url: String = format!(
|
||||
"postgresql://{}:{}@{}:{}/{}",
|
||||
CONFIG.postgres_user,
|
||||
|
||||
@@ -7,11 +7,11 @@ use axum::{
|
||||
};
|
||||
use axum_prometheus::PrometheusMetricLayer;
|
||||
use sqlx::PgPool;
|
||||
use std::sync::Arc;
|
||||
|
||||
use tower_http::trace::{self, TraceLayer};
|
||||
use tracing::Level;
|
||||
|
||||
use crate::{config::CONFIG, db::get_prisma_client};
|
||||
use crate::{config::CONFIG, db::get_postgres_pool};
|
||||
|
||||
pub mod donate_notifications;
|
||||
pub mod languages;
|
||||
@@ -40,7 +40,7 @@ async fn auth(req: Request<axum::body::Body>, next: Next) -> Result<Response, St
|
||||
}
|
||||
|
||||
pub async fn get_router() -> Router {
|
||||
let client = Arc::new(get_prisma_client().await);
|
||||
let client = get_postgres_pool().await;
|
||||
|
||||
let (prometheus_layer, metric_handle) = PrometheusMetricLayer::pair();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user