You've already forked pages
forked from didirus/AstralRinth
* Add dependencies to search * add attrs for faceting * run prepare * Add user data route from token * update to 24hrs * Fix report bugs
15 lines
299 B
Rust
15 lines
299 B
Rust
use actix_web::web;
|
|
use sqlx::PgPool;
|
|
|
|
pub async fn test_database(postgres: web::Data<PgPool>) -> Result<(), sqlx::Error> {
|
|
let mut transaction = postgres.acquire().await?;
|
|
sqlx::query(
|
|
"
|
|
SELECT 1
|
|
",
|
|
)
|
|
.execute(&mut transaction)
|
|
.await
|
|
.map(|_| ())
|
|
}
|