refactor: upload files with ingress call

This commit is contained in:
Per Stark
2025-01-03 15:27:14 +01:00
parent 69a0064250
commit 29dc0db7bc
7 changed files with 57 additions and 32 deletions

View File

@@ -20,7 +20,7 @@ use zettle_db::{
middleware_api_auth::api_auth,
routes::{
api::{
file::upload_handler, ingress::ingress_handler, query::query_handler,
file::upload_handler, ingress::ingress_data, query::query_handler,
queue_length::queue_length_handler,
},
html::{
@@ -132,7 +132,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
fn api_routes_v1(app_state: &AppState) -> Router<AppState> {
Router::new()
// Ingress routes
.route("/ingress", post(ingress_handler))
.route("/ingress", post(ingress_data))
.route("/message_count", get(queue_length_handler))
// File routes
.route("/file", post(upload_handler))