code cleanup in post endpoint

This commit is contained in:
filipriec
2025-07-24 22:18:36 +02:00
parent a96681e9d6
commit c82813185f

View File

@@ -12,8 +12,6 @@ use rust_decimal::Decimal;
use std::str::FromStr; use std::str::FromStr;
use crate::steel::server::execution::{self, Value}; use crate::steel::server::execution::{self, Value};
use crate::steel::server::functions::SteelContext;
use crate::indexer::{IndexCommand, IndexCommandData}; use crate::indexer::{IndexCommand, IndexCommandData};
use tokio::sync::mpsc; use tokio::sync::mpsc;
use tracing::error; use tracing::error;
@@ -138,13 +136,7 @@ pub async fn post_table_data(
format!("Script target column '{}' is required", target_column) format!("Script target column '{}' is required", target_column)
))?; ))?;
let context = SteelContext {
current_table: table_name.clone(),
schema_id,
schema_name: profile_name.clone(),
row_data: string_data_for_scripts.clone(),
db_pool: Arc::new(db_pool.clone()),
};
// Execute script to calculate expected value // Execute script to calculate expected value
let script_result = execution::execute_script( let script_result = execution::execute_script(