Add /shortcuts-csv-import
Build and Publish / Build and Test (push) Has been cancelled

This commit is contained in:
2024-10-31 12:03:36 +00:00
parent 6d2150d1b2
commit e60ab43abd
2 changed files with 28 additions and 1 deletions
+2 -1
View File
@@ -4,7 +4,7 @@ mod ingestion;
use crate::error::AppError;
use crate::ingestion::db;
use crate::ingestion::ingestion_logic::from_csv_row;
use crate::ingestion::routes::{monzo_batched_csv, monzo_batched_json};
use crate::ingestion::routes::{monzo_batched_csv, monzo_batched_json, shortcuts_csv};
use axum::routing::{get, post};
use axum::{Extension, Router};
use clap::{Parser, Subcommand};
@@ -119,6 +119,7 @@ async fn serve_web(address: SocketAddr, connection: DatabaseConnection) -> anyho
.route("/health", get(health_check))
.route("/monzo-batch-export", post(monzo_batched_json))
.route("/monzo-csv-ingestion", post(monzo_batched_csv))
.route("/shortcuts-csv-import", post(shortcuts_csv))
.layer(Extension(connection.clone()))
.layer(TraceLayer::new_for_http());