First one #8

Merged
phoenix merged 42 commits from get_it_going into v0.2.0 2026-06-13 19:49:15 -04:00
Showing only changes of commit bacf8b6645 - Show all commits
+9 -4
View File
@@ -1,7 +1,7 @@
use std::io::Write;
// use std::io::Write;
use common_multipart_rfc7578::client::multipart::{Body as MultipartBody, Form as MultipartForm};
use tower::ServiceExt;
// use common_multipart_rfc7578::client::multipart::{Body as MultipartBody, Form as MultipartForm};
// use tower::ServiceExt;
use textsender_api::db;
@@ -73,6 +73,7 @@ mod db_mgr {
}
}
/*
pub async fn migrations(pool: &sqlx::PgPool) {
// Run migrations using the sqlx::migrate! macro
// Assumes your test migrations are in a ./test_migrations folder relative to Cargo.toml
@@ -81,6 +82,7 @@ mod db_mgr {
.await
.expect("Failed to run migrations");
}
*/
}
mod init {
@@ -89,7 +91,8 @@ mod init {
.await
.layer(axum::Extension(pool))
.layer(axum::extract::DefaultBodyLimit::max(1024 * 1024 * 1024))
.layer(tower_http::timeout::TimeoutLayer::new(
.layer(tower_http::timeout::TimeoutLayer::with_status_code(
axum::http::StatusCode::OK,
std::time::Duration::from_secs(300),
))
}
@@ -110,10 +113,12 @@ mod util {
serde_json::from_slice(&body).unwrap()
}
/*
pub async fn format_url_with_value(endpoint: &str, value: &uuid::Uuid) -> String {
let last = endpoint.len() - 5;
format!("{}/{value}", &endpoint[0..last])
}
*/
}
pub fn token_fields() -> (String, String, String) {