9 lines
304 B
Rust
9 lines
304 B
Rust
pub mod authentication;
|
|
|
|
use crate::db_connection::{DbPool, MyPooledConnection};
|
|
use actix_web::{web, HttpResponse};
|
|
|
|
pub fn pool_handler(pool: web::Data<DbPool>) -> Result<MyPooledConnection, HttpResponse> {
|
|
pool.get()
|
|
.map_err(|e| HttpResponse::InternalServerError().json(e.to_string()))
|
|
}
|